Skip to content
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

Bug: The variable explorer doesn't show the shape of np arrays in the "count" column #2093

Closed
jay-pee opened this issue Mar 27, 2020 · 6 comments
Assignees

Comments

@jay-pee
Copy link

jay-pee commented Mar 27, 2020

Bug: The variable explorer doesn't show the shape of np arrays in the "count" column

Steps to cause the bug to occur

  1. Create two numpy arrays:
import numpy as np
x = np.array([1,2,3])
y = np.array([[1,2,3],[1,2,3]])
  1. Look at the variable explorer in the interactive window

Actual behavior

The "count" column shows only the number of rows I assume.

image

Expected behavior

I saw in a YouTube video that the "count" column should actually show the shape (x.shape)

image

I use a lot of linear algebra calculations with multi-dimensional arrays, so for me it is quite important to see the shape of an array at a glance. Workaround for me is using the iPython REPL to get the shape, which is clunky.

Your Jupyter and/or Python environment

Please provide as much info as you readily know

  • Jupyter server running: Local
  • Extension version: 2020.3.69010
  • VS Code version: 1.43.1
  • Setting python.jediEnabled: false
  • Python and/or Anaconda version: 3.7.7
  • OS: Windows
  • Virtual environment: N/A

Microsoft Data Science for VS Code Engineering Team: @rchiodo, @IanMatthewHuff, @DavidKutu, @DonJayamanne, @greazer

@jmew
Copy link
Contributor

jmew commented Mar 27, 2020

Thanks for logging the issue @jay-pee. I was able to verify it on our end too so i think something changed since our december build of the extension.
image

Might be a regression? cc @rchiodo

@jmew
Copy link
Contributor

jmew commented Mar 27, 2020

nevermind, just looked through our previous issues. It's a duplicate of microsoft/vscode-python#10140. The explanation for why we can only show one dimension is below:

"We switched computing the value of the variable to use the jupyter ? command instead of running python code. This output doesn't seem to include the shape for ndarrays.

We did this so we could start supporting other kernels besides python."

@jay-pee
Copy link
Author

jay-pee commented Mar 27, 2020

Thank you for your fast answer.

If its not a bug then see it as a feature request ;) In my opinion the "count" column is quite meaningless for numpy arrays and maybe also confusing in the current state.

@greazer
Copy link
Member

greazer commented Mar 27, 2020

While this is a regression, it's not quite meeting the bar for must fix at this time.

@jaewooklee93
Copy link

I think this feature is really important for many data scientists.

@rchiodo rchiodo self-assigned this Apr 15, 2020
@IanMatthewHuff IanMatthewHuff self-assigned this Apr 21, 2020
@IanMatthewHuff
Copy link
Member

Validated.

image.png

@lock lock bot locked as resolved and limited conversation to collaborators May 6, 2020
@microsoft microsoft unlocked this conversation Nov 13, 2020
@DonJayamanne DonJayamanne transferred this issue from microsoft/vscode-python Nov 13, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants