diff options
| author | zhang <zch921005@126.com> | 2022-04-09 18:42:41 +0800 |
|---|---|---|
| committer | zhang <zch921005@126.com> | 2022-04-09 18:42:41 +0800 |
| commit | f5f8b51f2858d2c87b9a9e155fadebdce3723448 (patch) | |
| tree | cebb057d64633b58a4108710cda8867dab9781c8 /nlp/demo.py | |
| parent | 5160842a647429b36494206ee573b5e3a38884e2 (diff) | |
更新脚本
Diffstat (limited to 'nlp/demo.py')
| -rw-r--r-- | nlp/demo.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nlp/demo.py b/nlp/demo.py index 9eb7154..1b15a71 100644 --- a/nlp/demo.py +++ b/nlp/demo.py @@ -4,8 +4,8 @@ import numpy as np def test1(): fun = lambda x: x**2 + 2*x - 3 - x0 = 1 - res = minimize(fun, [x0], bounds=[[0, None]], ) + x0 = np.asarray(1) + res = minimize(fun, x0, bounds=[[0, None]], ) print(res) |
