-
Notifications
You must be signed in to change notification settings - Fork 5
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
Addition of array of polynomials with scalar raises ValueError when comparing exponents. #101
Comments
I have found that the exponents of
the exponents become |
Another update: with this hack, division by scalars doesn't work. Simply commenting out the following lines at the end of
|
I'm not reproducing the error on my end. Which version of numpoly are you on? Also, can you compare version v1.2.9 and v1.2.10 and see if that makes a difference? |
Thanks for the reply. I was using v1.2.9 with Python 3.10.6. I tried both v1.2.9 and v1.2.10 now and for me the error occurs for both versions... Any ideas? |
Also, I'm using Numpy v1.25.0. |
Updating numpy to v1.25 did the trick; I can reproduce the issue. |
Numpy 1.25 had a few incompatabilities., but the issue should now be resolved in numpoly v1.2.11. |
It works perfectly now. Great work, I really appreciate it! |
Hello jonathf!
I have been using your modules in my research for a while now and I love them. I have stumbled upon a problem I can't manage to solve, however.
I have an array of polynomials (with 2 elements in the example) and want to add 1 to all of them. Running the following code:
Raises the following error:
It seems that the scalar 1 gets converted into
polynomial([1,1])
, but the exponents don't have the correct shape. Is there a better way to do this, or would it be possible to allow for this kind of arithmetic?Thanks in advance!
Jul
The text was updated successfully, but these errors were encountered: