dimwit 0.2.1__tar.gz → 0.2.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dimwit-0.2.1 → dimwit-0.2.2}/PKG-INFO +1 -1
- {dimwit-0.2.1 → dimwit-0.2.2}/dimwit/main.py +3 -3
- {dimwit-0.2.1 → dimwit-0.2.2}/pyproject.toml +1 -1
- {dimwit-0.2.1 → dimwit-0.2.2}/README.md +0 -0
- {dimwit-0.2.1 → dimwit-0.2.2}/dimwit/__init__.py +0 -0
- {dimwit-0.2.1 → dimwit-0.2.2}/dimwit/air_pollution.py +0 -0
- {dimwit-0.2.1 → dimwit-0.2.2}/dimwit/legacy.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: dimwit
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2
|
|
4
4
|
Summary: A package containing various functions and classes for fetching, transforming, and visualising data for personal metrics.
|
|
5
5
|
Home-page: https://github.com/danielsoutar/dimwit
|
|
6
6
|
Author: Daniel Soutar
|
|
@@ -272,10 +272,10 @@ def compute_rounded_matrix(ts, events, rounding_unit, rounding_size):
|
|
|
272
272
|
return df.fillna(0)
|
|
273
273
|
|
|
274
274
|
|
|
275
|
-
def pad_out_table(df, pad_t):
|
|
275
|
+
def pad_out_table(df, pad_t, unit):
|
|
276
276
|
# Pad out df with entries before and after boundary rows, to ensure correct
|
|
277
277
|
# copy-on padding.
|
|
278
|
-
time_diff = pd.Timedelta(pad_t, unit=
|
|
278
|
+
time_diff = pd.Timedelta(pad_t, unit=unit)
|
|
279
279
|
pad_before = [df.index[i] - time_diff for i in range(pad_t - 1)]
|
|
280
280
|
pad_after = [df.index[-(pad_t - i)] + time_diff for i in range(pad_t)]
|
|
281
281
|
df = pd.concat(
|
|
@@ -303,7 +303,7 @@ def compute_moving_average_matrix(
|
|
|
303
303
|
df_needs_padding = window_size > 1
|
|
304
304
|
if df_needs_padding:
|
|
305
305
|
pad_t = (window_size - 1) // 2
|
|
306
|
-
df = pad_out_table(df, pad_t)
|
|
306
|
+
df = pad_out_table(df, pad_t, rounding_unit)
|
|
307
307
|
|
|
308
308
|
window_string = str(rounding_size) + rounding_unit
|
|
309
309
|
dense_series = []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "dimwit"
|
|
3
|
-
version = "0.2.
|
|
3
|
+
version = "0.2.2"
|
|
4
4
|
description = "A package containing various functions and classes for fetching, transforming, and visualising data for personal metrics."
|
|
5
5
|
authors = ["Daniel Soutar <danielsoutar144@gmail.com>"]
|
|
6
6
|
readme = "README.md"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|