[問題] scipy spdiags
http://docs.scipy.org/doc/scipy/reference/generated/scipy.sparse.spdiags.html
我照這網站上的範例打結果出現錯誤@@
>>> from scipy import *
>>> data = array([[1,2,3,4],[1,2,3,4],[1,2,3,4]])
>>> diags = array([0,-1,2])
>>> spdiags(data, diags, 4, 4).todense()
Traceback (most recent call last):
File "<pyshell#3>", line 1, in <module>
spdiags(data, diags, 4, 4).todense()
NameError: name 'spdiags' is not defined
有import了應該是不會發生這種事情吧(?)
請問可能會是什麼問題呢?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 203.73.242.151
→
10/23 23:51, , 1F
10/23 23:51, 1F
→
10/23 23:52, , 2F
10/23 23:52, 2F
討論串 (同標題文章)
以下文章回應了本文:
完整討論串 (本文為第 1 之 2 篇):