__array__() takes 1 positional argument but 2 were given
时间: 2023-10-31 15:36:09 浏览: 66
django报错:add_atr() takes 0 positional arguments but 1 was given
This error message indicates that you have passed two arguments to a function or method that only takes one argument.
For example, if you have a numpy array object and you try to call the `__array__()` method with two arguments, you will get this error message. The `__array__()` method only takes one argument, which is the dtype of the returned array.
To fix this error, make sure you are only passing one argument to the function or method that you are calling. If you are unsure of the correct number of arguments, consult the documentation or source code for the function or method.
阅读全文