optimtool 2.7.0__tar.gz → 2.7.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. {optimtool-2.7.0 → optimtool-2.7.1}/PKG-INFO +2 -2
  2. {optimtool-2.7.0 → optimtool-2.7.1}/README.md +1 -1
  3. {optimtool-2.7.0 → optimtool-2.7.1}/optimtool/__init__.py +1 -1
  4. {optimtool-2.7.0 → optimtool-2.7.1}/optimtool/_version.py +1 -1
  5. {optimtool-2.7.0 → optimtool-2.7.1}/optimtool/unconstrain/gradient_descent.py +1 -1
  6. {optimtool-2.7.0 → optimtool-2.7.1}/optimtool/unconstrain/nonlinear_least_square.py +3 -3
  7. {optimtool-2.7.0 → optimtool-2.7.1}/optimtool/unconstrain/trust_region.py +3 -3
  8. {optimtool-2.7.0 → optimtool-2.7.1}/optimtool.egg-info/PKG-INFO +2 -2
  9. {optimtool-2.7.0 → optimtool-2.7.1}/setup.py +1 -1
  10. {optimtool-2.7.0 → optimtool-2.7.1}/LICENSE +0 -0
  11. {optimtool-2.7.0 → optimtool-2.7.1}/optimtool/_convert.py +0 -0
  12. {optimtool-2.7.0 → optimtool-2.7.1}/optimtool/_drive.py +0 -0
  13. {optimtool-2.7.0 → optimtool-2.7.1}/optimtool/_kernel.py +0 -0
  14. {optimtool-2.7.0 → optimtool-2.7.1}/optimtool/_proxim.py +0 -0
  15. {optimtool-2.7.0 → optimtool-2.7.1}/optimtool/_search.py +0 -0
  16. {optimtool-2.7.0 → optimtool-2.7.1}/optimtool/_typing.py +0 -0
  17. {optimtool-2.7.0 → optimtool-2.7.1}/optimtool/_utils.py +0 -0
  18. {optimtool-2.7.0 → optimtool-2.7.1}/optimtool/base.py +0 -0
  19. {optimtool-2.7.0 → optimtool-2.7.1}/optimtool/constrain/__init__.py +0 -0
  20. {optimtool-2.7.0 → optimtool-2.7.1}/optimtool/constrain/equal.py +0 -0
  21. {optimtool-2.7.0 → optimtool-2.7.1}/optimtool/constrain/mixequal.py +0 -0
  22. {optimtool-2.7.0 → optimtool-2.7.1}/optimtool/constrain/unequal.py +0 -0
  23. {optimtool-2.7.0 → optimtool-2.7.1}/optimtool/example/Lasso.py +0 -0
  24. {optimtool-2.7.0 → optimtool-2.7.1}/optimtool/example/WanYuan.py +0 -0
  25. {optimtool-2.7.0 → optimtool-2.7.1}/optimtool/example/__init__.py +0 -0
  26. {optimtool-2.7.0 → optimtool-2.7.1}/optimtool/hybrid/__init__.py +0 -0
  27. {optimtool-2.7.0 → optimtool-2.7.1}/optimtool/hybrid/approt.py +0 -0
  28. {optimtool-2.7.0 → optimtool-2.7.1}/optimtool/hybrid/fista.py +0 -0
  29. {optimtool-2.7.0 → optimtool-2.7.1}/optimtool/hybrid/nesterov.py +0 -0
  30. {optimtool-2.7.0 → optimtool-2.7.1}/optimtool/unconstrain/__init__.py +0 -0
  31. {optimtool-2.7.0 → optimtool-2.7.1}/optimtool/unconstrain/newton.py +0 -0
  32. {optimtool-2.7.0 → optimtool-2.7.1}/optimtool/unconstrain/newton_quasi.py +0 -0
  33. {optimtool-2.7.0 → optimtool-2.7.1}/optimtool.egg-info/SOURCES.txt +0 -0
  34. {optimtool-2.7.0 → optimtool-2.7.1}/optimtool.egg-info/dependency_links.txt +0 -0
  35. {optimtool-2.7.0 → optimtool-2.7.1}/optimtool.egg-info/not-zip-safe +0 -0
  36. {optimtool-2.7.0 → optimtool-2.7.1}/optimtool.egg-info/requires.txt +0 -0
  37. {optimtool-2.7.0 → optimtool-2.7.1}/optimtool.egg-info/top_level.txt +0 -0
  38. {optimtool-2.7.0 → optimtool-2.7.1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: optimtool
3
- Version: 2.7.0
3
+ Version: 2.7.1
4
4
  Summary: The fundamental package for scientific research in optimization.
5
5
  Home-page: https://github.com/linjing-lab/optimtool
6
6
  Download-URL: https://github.com/linjing-lab/optimtool/tags
@@ -74,7 +74,7 @@ pip install optimtool --upgrade
74
74
  ```text
75
75
  pip install optimtool==2.3.5
76
76
  ```
77
- 下载补全typing变量的版本:
77
+ 下载优化库架构并增加typing变量的版本:
78
78
  ```text
79
79
  pip install optimtool>=2.4.0
80
80
  ```
@@ -45,7 +45,7 @@ pip install optimtool --upgrade
45
45
  ```text
46
46
  pip install optimtool==2.3.5
47
47
  ```
48
- 下载补全typing变量的版本:
48
+ 下载优化库架构并增加typing变量的版本:
49
49
  ```text
50
50
  pip install optimtool>=2.4.0
51
51
  ```
@@ -32,4 +32,4 @@ from .base import MATPLOTLIB_VERSION
32
32
  from ._version import __version__
33
33
 
34
34
  if sys.version_info < (3, 7, 0):
35
- raise OSError(f'optimtool-2.7.0 requires Python >=3.7, but yours is {sys.version}')
35
+ raise OSError(f'optimtool-2.7.1 requires Python >=3.7, but yours is {sys.version}')
@@ -18,4 +18,4 @@
18
18
  # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
19
  # SOFTWARE.
20
20
 
21
- __version__ = '2.7.0'
21
+ __version__ = '2.7.1'
@@ -168,7 +168,7 @@ def barzilar_borwein(funcs: FuncArray,
168
168
  x_0 = x_0 + delta
169
169
  yk = np.array(res.subs(dict(zip(args, x_0)))).astype(DataType) + dk
170
170
  alpha_up = delta.dot(delta.T)
171
- alpha_down = delta.dot(yk.T)
171
+ alpha_down = (delta.dot(yk.T))[0]
172
172
  if alpha_down != 0:
173
173
  alpha = alpha_up / alpha_down
174
174
  k += 1
@@ -132,12 +132,12 @@ def levenberg_marquardt(funcr: FuncArray,
132
132
  pk_down = -(grad_f.dot(dk.T) + 0.5*((dk.dot(hess_f)).dot(dk.T)))
133
133
  pk = pk_up / pk_down
134
134
  if np.linalg.norm(dk) >= epsilon:
135
- if pk < p1:
135
+ if pk[0][0] < p1:
136
136
  lamk *= gamma2
137
137
  else:
138
- if pk > p2:
138
+ if pk[0][0] > p2:
139
139
  lamk *= gamma1
140
- if pk > eta:
140
+ if pk[0][0] > eta:
141
141
  x_0 += dk[0]
142
142
  k += 1
143
143
  else:
@@ -88,12 +88,12 @@ def steihaug_CG(funcs: FuncArray,
88
88
  if np.linalg.norm(dk) >= epsilon:
89
89
  funvk = np.array(funcs.subs(dict(zip(args, x_0 + dk[0])))).astype(DataType)
90
90
  pk = (funv - funvk) / -(grad.dot(dk.T) + 0.5*((dk.dot(hessi)).dot(dk.T)))
91
- if pk < p1:
91
+ if pk[0][0] < p1:
92
92
  r0 *= gamma1
93
93
  else:
94
- if (pk > p2) or (np.linalg.norm(dk) == r0):
94
+ if (pk[0][0] > p2) or (np.linalg.norm(dk) == r0):
95
95
  r0 = min(gamma2 * r0, rmax)
96
- if pk > eta:
96
+ if pk[0][0] > eta:
97
97
  x_0 += dk[0]
98
98
  k += 1
99
99
  else:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: optimtool
3
- Version: 2.7.0
3
+ Version: 2.7.1
4
4
  Summary: The fundamental package for scientific research in optimization.
5
5
  Home-page: https://github.com/linjing-lab/optimtool
6
6
  Download-URL: https://github.com/linjing-lab/optimtool/tags
@@ -74,7 +74,7 @@ pip install optimtool --upgrade
74
74
  ```text
75
75
  pip install optimtool==2.3.5
76
76
  ```
77
- 下载补全typing变量的版本:
77
+ 下载优化库架构并增加typing变量的版本:
78
78
  ```text
79
79
  pip install optimtool>=2.4.0
80
80
  ```
@@ -4,7 +4,7 @@ import sys
4
4
  from setuptools import setup
5
5
 
6
6
  if sys.version_info < (3, 7, 0):
7
- raise OSError(f'optimtool-2.7.0 requires Python >=3.7, but yours is {sys.version}')
7
+ raise OSError(f'optimtool-2.7.1 requires Python >=3.7, but yours is {sys.version}')
8
8
 
9
9
  if (3, 7, 0) <= sys.version_info < (3, 8, 0):
10
10
  # https://github.com/pypa/setuptools/issues/926#issuecomment-294369342
File without changes
File without changes
File without changes
File without changes
File without changes