Search code examples
numpypycharm

Visualising numpy arrays in PyCharm


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!


Solution

  • 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/