scipy.optimize函数或模块在哪里?

时间:2018-06-14 12:04:35

标签: optimization scipy

我想在import scipy as sp def f1p(x): return 2 * (x - 2) result = sp.optimize.minimize(f1, x0, jac=f1p) print(result) 中使用优化方法但是。它失败了。

我制作简单的代码,

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-67-435b98a570a0> in <module>()
----> 1 result = sp.optimize.minimize(f1, x0, jac=f1p)
      2 print(result)
      3 scipy.optimize.minimize

AttributeError: module 'scipy' has no attribute 'optimize'

this link[enter link description here][1], official scipy documentation also said `scipy.optimize` can be used. 

但错误提高了。

Public Sub remplirzones(z() As TextBox, t As String, n As Integer, ch As String)
    seConnecter()
    req = "select * from " & t & " where " & ch & "=" & n
    cm = New OleDbCommand(req, cnx)
    dr = cm.ExecuteReader()
    dr.Read()
    For i = 0 To z.Count - 1
        z(i).Text = dr(i + 1)
    Next

    seDeconnecter()
End Sub


Private Sub ComboBox2_SelectedIndexChanged(sender As Object, e As EventArgs) 
    Handles ComboBox2.SelectedIndexChanged
    Dim zone() As TextBox = { txtsigle, txtlieu, txtempalcement, txtmatricule, txtnserie, txttype, txtcapacite, txtdateepreuve, txtanomalies, txtactinprise, txtdateverification }
    remplirzones(zone, "extincteur", Val(ComboBox2.Text), "id")
End Sub

我不知道为什么我发生了。我想知道它在哪里?

0 个答案:

没有答案