-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Polynomial can't be evaluated on list of numbers only ndarray of numbers #17949
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
My feeling is that |
It would be sufficient if it casts an array-like parameter to np.array inside the |
… method. Use the utility function `polyutils.mapdomain()` in the `__call__` method of `ABCPolyBase`. This closes numpygh-17949 because `mapdomain` calls `np.asanyarray(x)` on its first argument. Closes numpygh-17949.
I just ran into this. The issue still exists with the main development branch:
|
Polynomials can be evaluated on objects, matrices for example, and a list is just another object, but fails because it cannot be multiplied by floats (coefficients). |
Is it on purpose that this doesn't work:
but this does:
The text was updated successfully, but these errors were encountered: