-
-
Notifications
You must be signed in to change notification settings - Fork 232
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from tgsmith61591/release-0.6.5
Release 0.6.5
- Loading branch information
Showing
32 changed files
with
378 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
[run] | ||
branch = True | ||
source = pyramid | ||
include = */pyramid/* | ||
omit = | ||
*/setup.py | ||
*/__check_build/* | ||
*/_build_utils/* | ||
*/_build_utils/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,9 @@ | |
# Pypi pws | ||
.pypipws | ||
|
||
# Coverage | ||
coverage | ||
|
||
# OAuth access for automating releases | ||
ACCESS_TOKEN | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# -*- coding: utf-8 -*- | ||
# | ||
# Benchmark various approaches to functions to speed things up. | ||
# ... hopefully. | ||
|
||
from __future__ import absolute_import | ||
|
||
import numpy as np | ||
|
||
import time | ||
|
||
|
||
def _do_time(func, n_iter=10, *args, **kwargs): | ||
times = [] | ||
for _ in range(n_iter): | ||
start = time.time() | ||
func(*args, **kwargs) | ||
times.append(time.time() - start) | ||
|
||
times = np.asarray(times) | ||
print("Completed %i iterations (avg=%.6f, min=%.6f, max=%.6f)" | ||
% (n_iter, times.mean(), times.min(), times.max())) | ||
|
||
|
||
def benchmark_is_constant(): | ||
"""This benchmarks the "is_constant" function from ``pyramid.arima.utils``. | ||
This was added in 0.6.2. | ||
""" | ||
# WINNER! | ||
def is_const1(x): | ||
"""This is the version in Pyramid 0.6.2. | ||
Parameters | ||
---------- | ||
x : np.ndarray | ||
This is the array. | ||
""" | ||
return (x == x[0]).all() | ||
|
||
def is_const2(x): | ||
"""This should ostensibly only take O(N) rather than O(2N) like | ||
its predecessor. But we'll see... | ||
Parameters | ||
---------- | ||
x : np.ndarray | ||
This is the array. | ||
""" | ||
return np.unique(x).shape[0] == 1 | ||
|
||
x = np.random.choice(np.arange(10), 1000000, replace=True) | ||
_do_time(is_const1, 25, x) | ||
_do_time(is_const2, 25, x) | ||
|
||
|
||
if __name__ == '__main__': | ||
benchmark_is_constant() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Cython>=0.23 | ||
numpy>=1.9 | ||
scipy>=0.9 | ||
scikit-learn>=0.17 | ||
statsmodels>=0.8 | ||
sphinx | ||
sphinx_rtd_theme | ||
matplotlib==2.2.0rc1 | ||
sphinx_gallery==0.1.13 | ||
numpydoc==0.7.0 | ||
Django==1.11 | ||
image==1.5.19 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
from __future__ import absolute_import |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
from __future__ import absolute_import | ||
|
||
from pyramid.__check_build import raise_build_error | ||
|
||
from nose.tools import assert_raises | ||
|
||
|
||
def test_raise_build_error(): | ||
try: | ||
raise ValueError("this is a dummy err msg") | ||
except ValueError as v: | ||
assert_raises(ImportError, raise_build_error, v) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
from __future__ import absolute_import |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.