summaryrefslogtreecommitdiff
path: root/nlp/demo.py
diff options
context:
space:
mode:
authorzhang <zch921005@126.com>2022-04-09 18:42:41 +0800
committerzhang <zch921005@126.com>2022-04-09 18:42:41 +0800
commitf5f8b51f2858d2c87b9a9e155fadebdce3723448 (patch)
treecebb057d64633b58a4108710cda8867dab9781c8 /nlp/demo.py
parent5160842a647429b36494206ee573b5e3a38884e2 (diff)
更新脚本
Diffstat (limited to 'nlp/demo.py')
-rw-r--r--nlp/demo.py4
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)