TypeError: 'numpy.ndarray' object is not callable
生活随笔
收集整理的這篇文章主要介紹了
TypeError: 'numpy.ndarray' object is not callable
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
取ndarray的某幾個數,若寫為:
a = np.array([0,1,2,3,4,5,6]) index = np.array([1,2,3]) b = a(index) print(b)則會報錯TypeError: 'numpy.ndarray' object is not callable
正確寫法為:
a = np.array([0,1,2,3,4,5,6]) index = np.array([1,2,3]) b = a[index] print(b)?
總結
以上是生活随笔為你收集整理的TypeError: 'numpy.ndarray' object is not callable的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: opencv2.4.9报错找不到open
- 下一篇: 神经网络中Batch和Epoch之间的区