import numpy as np from scipy.stats import norm from scipy.integrate import quad xs = np.linspace(0, 40, 40) [quad(norm.pdf, -np.inf, x)[0] for x in xs] [0.4999999999999999, 0.8474695889892241, 0.9798802563169332, 0.9989542536697613, 0.9999795701700213,
This file contains hidden or 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
| =============================================================================== test session starts =============================================================================== | |
| platform linux -- Python 3.6.2, pytest-3.2.2, py-1.4.34, pluggy-0.4.0 | |
| rootdir: /home/anz/software/scipy-master, inifile: pytest.ini | |
| collected 268 items | |
| scipy/io/arff/tests/test_arffread.py .................. | |
| scipy/io/harwell_boeing/tests/test_fortran_format.py ........... | |
| scipy/io/harwell_boeing/tests/test_hb.py .. | |
| scipy/io/matlab/tests/test_byteordercodes.py .. | |
| scipy/io/matlab/tests/test_mio.py ..................................................... |
This file contains hidden or 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
| import matplotlib | |
| matplotlib.use("Agg") | |
| import matplotlib.pyplot as plt | |
| import matplotlib.animation as manimation | |
| def video_generator(objective, chain, fps=5): | |
| # set up the video | |
| FFMpegWriter = manimation.writers['ffmpeg'] |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
| diff --git a/benchmarks/benchmarks/optimize.py b/benchmarks/benchmarks/optimize.py | |
| index 6696f7d..3a9abf6 100644 | |
| --- a/benchmarks/benchmarks/optimize.py | |
| +++ b/benchmarks/benchmarks/optimize.py | |
| @@ -17,6 +17,8 @@ try: | |
| except ImportError: | |
| pass | |
| +from shgo import shgo | |
| + |
This file contains hidden or 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
| """ | |
| problem.py | |
| """ | |
| import numpy as np | |
| import time | |
| from scipy.interpolate import interp1d | |
| from scipy.optimize import minimize, root | |
| """ | |
| Sample1D class |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
| from joblib import Parallel, delayed | |
| class PoolWrapper(object): | |
| def __init__(self, pool=-1): | |
| self.pool = None | |
| self._mapfunc = map | |
| self._own_pool = False | |
| if hasattr(pool, 'map'): | |
| self.pool = pool |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.