Submit
Path:
~
/
/
proc
/
thread-self
/
root
/
opt
/
alt
/
python35
/
lib64
/
python3.5
/
site-packages
/
scipy
/
optimize
/
File Content:
_tstutils.py
''' Parameters used in test and benchmark methods ''' from __future__ import division, print_function, absolute_import from random import random from scipy.optimize import zeros as cc def f1(x): return x*(x-1.) def f2(x): return x**2 - 1 def f3(x): return x*(x-1.)*(x-2.)*(x-3.) def f4(x): if x > 1: return 1.0 + .1*x if x < 1: return -1.0 + .1*x return 0 def f5(x): if x != 1: return 1.0/(1. - x) return 0 def f6(x): if x > 1: return random() elif x < 1: return -random() else: return 0 description = """ f2 is a symmetric parabola, x**2 - 1 f3 is a quartic polynomial with large hump in interval f4 is step function with a discontinuity at 1 f5 is a hyperbola with vertical asymptote at 1 f6 has random values positive to left of 1, negative to right of course these are not real problems. They just test how the 'good' solvers behave in bad circumstances where bisection is really the best. A good solver should not be much worse than bisection in such circumstance, while being faster for smooth monotone sorts of functions. """ methods = [cc.bisect,cc.ridder,cc.brenth,cc.brentq] mstrings = ['cc.bisect','cc.ridder','cc.brenth','cc.brentq'] functions = [f2,f3,f4,f5,f6] fstrings = ['f2','f3','f4','f5','f6']
Submit
FILE
FOLDER
Name
Size
Permission
Action
__pycache__
---
0755
_lsq
---
0755
tests
---
0755
__init__.py
6526 bytes
0644
_basinhopping.py
26053 bytes
0644
_cobyla.cpython-35m-x86_64-linux-gnu.so
128896 bytes
0755
_differentialevolution.py
32558 bytes
0644
_group_columns.cpython-35m-x86_64-linux-gnu.so
141704 bytes
0755
_hungarian.py
9379 bytes
0644
_lbfgsb.cpython-35m-x86_64-linux-gnu.so
133600 bytes
0755
_linprog.py
37305 bytes
0644
_minimize.py
26435 bytes
0644
_minpack.cpython-35m-x86_64-linux-gnu.so
131488 bytes
0755
_nnls.cpython-35m-x86_64-linux-gnu.so
46656 bytes
0755
_numdiff.py
21209 bytes
0644
_root.py
26007 bytes
0644
_slsqp.cpython-35m-x86_64-linux-gnu.so
100568 bytes
0755
_spectral.py
7986 bytes
0644
_trustregion.py
8598 bytes
0644
_trustregion_dogleg.py
4449 bytes
0644
_trustregion_ncg.py
4646 bytes
0644
_tstutils.py
1322 bytes
0644
_zeros.cpython-35m-x86_64-linux-gnu.so
15760 bytes
0755
cobyla.py
9915 bytes
0644
lbfgsb.py
18069 bytes
0644
linesearch.py
24201 bytes
0644
minpack.py
30534 bytes
0644
minpack2.cpython-35m-x86_64-linux-gnu.so
47448 bytes
0755
moduleTNC.cpython-35m-x86_64-linux-gnu.so
40336 bytes
0755
nnls.py
1423 bytes
0644
nonlin.py
46681 bytes
0644
optimize.py
101006 bytes
0644
setup.py
3267 bytes
0644
slsqp.py
17983 bytes
0644
tnc.py
16533 bytes
0644
zeros.py
19912 bytes
0644
N4ST4R_ID | Naxtarrr