3

I'm trying to use PyCharm for developing and debugging numpy code, and I would like to have a similar tool for inspecting numpy arrays. According to this link https://www.jetbrains.com/pycharm/features/scientific_tools.html there is built-in numpy array viewer. However, when stopped in the debugger, all I could see is this:

Debug window

which is a really low-level representation. Is this really what they mean by the "array viewer" or there is the feature hidden in somewhere.

Thanks!

3 Answers 3

9

To view a NumPy array, run your project in a debug mode and find the NumPy array in the variables list shown in the PyCharm`s graphical debugger. Right-click it and select “View as Array”.

It should look like this (not the low-level representation you're seeing.):

enter image description here

Source: https://blog.jetbrains.com/pycharm/2014/11/third-pycharm-4-eap-numpy-array-viewer-ipython-notebook-improvements-and-more/

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks, I completely missed that one out :)
1

If a numpy array is an image and you want to see its content visually, you can use OpenCV Image Viewer Plugin, which I've just released. It works with any JetBrains IDE, which support Python (directly or via plugin).

https://plugins.jetbrains.com/plugin/14371-opencv-image-viewer

enter image description here

Comments

0

This might be extremely outdated, but i hope it helps someone. It looks like those options only appear when executed in the console, soo you have to set run in the console by default. Go to the upper right to debug configurations, press edit configuration, modify options and select run with python console. Photos to guide. [1]: https://i.sstatic.net/mL17Tj1D.png [2]: https://i.sstatic.net/0bZc7YyC.png

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.