账号密码登录
微信安全登录
微信扫描二维码登录

登录后绑定QQ、微信即可实现信息互通

手机验证码登录
找回密码返回
邮箱找回 手机找回
注册账号返回
其他登录方式
分享
  • 收藏
    X
    TypeError: 'list' object is not callable
    23
    0

    代码:

    import numpy as np
    x_12 = np.array([[1,2,3],[4,5,6]])
    y_54 = np.array([[6,23],[-1,7],[8,9]])
    x.dot(y)
    np.dot(x, y)

    报错信息:

    ---------------------------------------------------------------------------
    TypeError                                 Traceback (most recent call last)
    <ipython-input-28-c6560b5934b1> in <module>
          1 import numpy as np
    ----> 2 x_12 = np.array([[1,2,3],[4,5,6]])
          3 y_54 = np.array([[6,23],[-1,7],[8,9]])
          4 x.dot(y)
          5 np.dot(x, y)
    
    TypeError: 'list' object is not callable

    使用的是Jupyter Notebook,

    0
    打赏
    收藏
    点击回答
        全部回答
    • 0
    • 都市少缘人 普通会员 1楼

      This error occurs when you try to call a function or method on a list object, but the list object itself is not callable. For example: my_list = [1, 2, 3] my_list[0] = 4

      In this case, the error message is telling you that the list object "my_list" is not callable, because it is not an instance of the built-in Python function list. To fix this error, you need to make sure that the list object you are trying to call the function on is actually callable. For example: my_list = [1, 2, 3] my_list.append(4)

      Now, the list object "my_list" is an instance of the built-in Python function list, and you can call the append method on it to add a new element to it.

    更多回答
    扫一扫访问手机版
    • 回到顶部
    • 回到顶部