-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Spyder encountered a problem when opening numpy array #8582
Comments
I can post the array if needed. If desired, what format do you guys want? There is nothing special about it, just a 120x12 numpy arrray. each float64 is 4 decimal places, no extended precision weird stuff or anything like that. tried restarting spyder, same non-special array opens fine in spyder 2.3.8, which seems to have the most stable variable explorer (loads properly, updates values properly etc), but this version has issues I have mostly worked around regarding per-file run settings. |
Please post the command you're using to generate it. |
it is captured data, that's why I asked if you'd like me to post it. but there's nothing special, it was imported from a tdms file but printing it in the ipython window works just fine, it seems valid. |
Then an npz file should be enough. |
Alright, it's attached as a zip because GH got mad at npz. Rename 'zip' to 'npz' then open with np.load (as I'm sure you're aware) I opened with np.load, and verified the incoming array also produces the same issue when double clicking in the variable explorer. Like I said, nothing is special about it. If you find this to be not true, please let me know.. I'm curious! Thanks for helping make spyder better. |
Thanks for your help! |
No problem, thanks for supporting. This piece of software made it easy for me to leave Matlab in the dust, eventually leading me to use Git and properly version control my Python code and older C# projects, and taught me how to bug report. So I am happy to help you out with at least decent bug reports :D |
Is this problem fixed ? |
No, it hasn't. |
This is popping up a lot lately. Is this bug related to #6213 as well? |
I think this is caused by the new Numpy 1.16. That should be why we're getting so much reports about this problem lately. |
I'm not sure what goes on under the hood, but I have not found the variable explorer to be 100% reliable since spyder 2.3.8, but 2.3.8 chokes up on spaces in the path for per-file input args which is so 90's. It wouldn't always update the values after a run. The issue not updating values was not reproduceable enough for me to report. Now with it not opening at all, AND it putting a nice template right in front of my face I couldn't not report. The variable explorer is probably my favorite feature of Spyder, seems like it needs to be made more robust (probably easier said than done). Wish I could help more, please let me know if I can provide anything else. |
@sayboltm The Variable Explorer in 2.3.8 only supported a limited set of types, while in recent 3.2.x versions it can now (theoretically, issues like this aside) display almost all types, which results in many more edge/corner cases that need to be accounted for. We're working to improve this further for Spyder 4, including a dedicated arbitrary object viewer and support for Numpy object types. @ccordoba12 According to numpy/numpy#12791 , setting the flag manually is a dangerous practice and accordingly has been removed in 1.16, and if we've made a copy of the original array (which should always be the case, AFAIK) it should be writable already in any modern Numpy version. If its not for some very special-case reason, we shouldn't try to modify it, so we should set Should I go ahead and implement this accordingly? Although its not a clean merge, should we consider including this in 3.3.3, since as people start upgrading to Numpy 1.16 en masse we're going to get a flood of reports and it will completely break viewing/editing any arrays in the Variable Explorer? |
Was this issue resolved ? |
@NaderNazemi Yes, as you can see by the fact that it is closed, it is marked with the milestone of a released Spyder version (3.3.3) and is addressed in the linked PR, #8632 . |
Spyder 3.3.3 working on a Windows Server 2019 ( which is very similar to win10) still suffers from this problem. I can solve it by downgrade numpy to 14.0. However, some other packages rely on numpy 16.0, so my solution is transfering the numpy array to |
@Li-Shu14 Hey, Spyder 3.3.3 is almost two years old and is no longer supported, the current version being 4.2.0. Can you verify if this problem still occurs with 4.2.0 and a supported release of Numpy 1.16+? Thanks. |
Description
What steps will reproduce the problem?
build 120x12 array of float64
double click to open in variable explorer
Traceback
Versions
Dependencies
The text was updated successfully, but these errors were encountered: