-
Notifications
You must be signed in to change notification settings - Fork 28
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
Handle readonly numpy arrays #19
Comments
Am I right that this is not currently part of the testsuite? I mean – the tests run on your machine, with Numpy 1.7, right? Then, would you be willing to submit a PR introducing a test for this? |
Wow… from reading the code now, I get the feeling that you uncovered a bug introduced by me trying to optimize too much: If no normalization is applied, the latest qimage2ndarray would clip the input array to the 0...255 range in-place! I guess I can quickly introduce a new test based on your code, disregard my question. |
Thanks for reporting. I just released a bugfix version 1.8.3. |
Now it works. Thank you for the quick fix! |
I'm using this module since three years now and works like a charm, thank you!
However since numpy 1.17 I get an error when trying to convert readonly arrays to qimage, like in this minimal working example:
The last line results in the following Exception:
An easy fix on my side is to just pass a copy of the numpy array to array2qimage. However, since I assume that QImage already needs its own copy of the image data I wonder if it would be possible to convert the image without having to change the input array or create another copy.
The text was updated successfully, but these errors were encountered: