Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions pyActigraphy/sleep/scoring_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def _padded_data(data, value, periods, frequency):
end=data.index[0],
periods=periods,
freq=date_offset,
closed='left'
inclusive='left'
),
dtype=data.dtype
)
Expand All @@ -75,7 +75,7 @@ def _padded_data(data, value, periods, frequency):
start=data.index[-1],
periods=periods,
freq=date_offset,
closed='right'
inclusive='right'
),
dtype=data.dtype
)
Expand Down Expand Up @@ -1384,12 +1384,10 @@ def Crespo(
# symmetrical anymore. In the regions (start, start+alpha/2,
# the median needs to be calculate by hand.
# The range is start, start+alpha as the window is centered.
median_start = x_sp.iloc[0:L_w].expanding(
center=True
).median()
median_start = x_sp.iloc[0:L_w].expanding().median()
median_end = x_sp.iloc[-L_w-1:-1].sort_index(
ascending=False
).expanding(center=True).median()[::-1]
).expanding().median()[::-1]

# replace values in the original x_fa series with the new values
# within the range (start, start+alpha/2) only.
Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ def find_version(*file_paths):
# For an analysis of "install_requires" vs pip's requirements files see:
# https://packaging.python.org/en/latest/requirements.html
install_requires=[
'joblib', 'lmfit', 'pandas', 'plotly', 'numba', 'numpy', 'pyexcel',
'pyexcel-ods3', 'pyexcel-xlsx', 'scipy', 'spm1d', 'statsmodels>=0.10',
'stochastic>=0.6.0', 'accelerometer>=6.2.2'
'joblib', 'lmfit', 'pandas>=1.4.0', 'plotly', 'numba', 'numpy',
'pyexcel', 'pyexcel-ods3', 'pyexcel-xlsx', 'scipy', 'spm1d',
'statsmodels>=0.10', 'stochastic>=0.6.0', 'accelerometer>=6.2.2'
], # Optional

# Data files included in your packages that need to be installed.
Expand Down