Skip to content

BUG: seasonal_decompose, don't check inferred_freq if freq given, - #4007

Merged
josef-pkt merged 1 commit into
statsmodels:masterfrom
josef-pkt:bug_seasonal_nofreq_3503
Oct 10, 2017
Merged

josef-pkt merged 1 commit into
statsmodels:masterfrom
josef-pkt:bug_seasonal_nofreq_3503

Conversation

@josef-pkt

@josef-pkt josef-pkt commented Oct 9, 2017 •

Copy link
Copy Markdown
Member

closes #3503

solution is about as discussed in #3503 avoiding freq check early in the function if freq is given
The two _maybe_get_pandas_wrapper functions overlap in code but I didn't merge them here.

+    if freq is None:
 +        _pandas_wrapper, pfreq = _maybe_get_pandas_wrapper_freq(x)
 +    else:
 +        _pandas_wrapper = _maybe_get_pandas_wrapper(x)
 +        pfreq = None

@josef-pkt josef-pkt added this to the 0.9 milestone Oct 10, 2017
@coveralls

coveralls commented Oct 10, 2017 •

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.0005%) to 81.641% when pulling 52ab10c on josef-pkt:bug_seasonal_nofreq_3503 into ea506de on statsmodels:master.

@codecov-io

Copy link
Copy Markdown

Codecov Report

Merging #4007 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4007      +/-   ##
==========================================
- Coverage   79.06%   79.05%   -0.01%     
==========================================
  Files         542      542              
  Lines       81018    81032      +14     
  Branches     9202     9205       +3     
==========================================
+ Hits        64055    64062       +7     
- Misses      14873    14876       +3     
- Partials     2090     2094       +4
Impacted Files Coverage Δ
statsmodels/tsa/filters/_utils.py 41.97% <100%> (-1.24%) ⬇️
statsmodels/tsa/seasonal.py 63.51% <100%> (+4.35%) ⬆️
statsmodels/tsa/tests/test_seasonal.py 100% <100%> (ø) ⬆️
statsmodels/tsa/filters/hp_filter.py 90.47% <0%> (-9.53%) ⬇️
statsmodels/tsa/filters/bk_filter.py 90.9% <0%> (-9.1%) ⬇️
statsmodels/tsa/filters/cf_filter.py 82.75% <0%> (-6.9%) ⬇️
statsmodels/tsa/filters/filtertools.py 38.57% <0%> (-2.86%) ⬇️
statsmodels/tsa/vector_ar/vecm.py 93.87% <0%> (+0.24%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ea506de...52ab10c. Read the comment docs.

return _get_pandas_wrapper(X, trim_head, trim_tail)
else:
return
return lambda x : x

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not returning something here was a bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

seasonal_decompose() With Known Freq but Without DatetimeIndex()

3 participants