Skip to content

Commit

Permalink
Update docstring and after_success
Browse files Browse the repository at this point in the history
  • Loading branch information
tgsmith61591 committed Feb 14, 2018
1 parent a882f6e commit 30fcd27
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
4 changes: 3 additions & 1 deletion build_tools/travis/after_success.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ if [[ "$COVERAGE" == "true" ]]; then
# very reliable but we don't want travis to report a failure
# in the github UI just because the coverage report failed to
# be published.
coveralls || echo "Coveralls upload failed"
coveralls --rcfile .coveragerc || echo "Coveralls upload failed"
else
echo "Skipping coverage upload since COVERAGE=false"
fi

# make sure we have twine in case we deploy
Expand Down
12 changes: 10 additions & 2 deletions pyramid/arima/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@ def is_constant(x):
----------
x : array-like, shape=(n_samples,)
The time series vector.
Examples
--------
>>> import numpy as np
>>> x = np.array([1, 2, 3])
>>> y = np.ones(3)
>>> [is_constant(x), is_constant(y)]
[False, True]
"""
x = column_or_1d(x) # type: np.ndarray
return (x == x[0]).all()
Expand Down Expand Up @@ -120,9 +128,9 @@ def ndiffs(x, alpha=0.05, test='kpss', max_d=2, **kwargs):
testfunc = get_callable(test, VALID_TESTS)(alpha, **kwargs).is_stationary
x = column_or_1d(check_array(x, ensure_2d=False,
force_all_finite=True, dtype=DTYPE))
d = 0

# base case
# base case, if constant return 0
d = 0
if is_constant(x):
return d

Expand Down

0 comments on commit 30fcd27

Please sign in to comment.