You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When it shows a python array in vscode inline results. It would only show Python when unexpanded because of the line end. Would it be better to show more informative like Julia Array shows 4×4 Matrix{Float64}: on the first line?
Describe the solution you'd like
shows numpy array shape like 4×4 Matrix{Float64}:
I'm hesitant to make this code depend on the actual Python type - currently this basically just shows repr(x). I'm not totally against the idea though - I agree it's useful info.
Maybe you could suggest this change to numpy itself?
To explain for myself: when a Py is shown, if it has multiple lines then the Python: prefix occurs on its own line, such as with numpy arrays:
Python:
array(
[ ... ], dtype=int64)
If you execute code line-by-line from a Julia script in VS Code then it only displays the first line ("Python:") which is not very informative. So this question is about adding extra info into the first line.
Activity
cjdoris commentedon Sep 21, 2023
I'm hesitant to make this code depend on the actual Python type - currently this basically just shows
repr(x). I'm not totally against the idea though - I agree it's useful info.Maybe you could suggest this change to numpy itself?
xgdgsc commentedon Sep 22, 2023
Would there still be a first line
Python:? How feasible is it to add something like numpy/numpy#9029 (comment) ?cjdoris commentedon Sep 22, 2023
Oh I see your point now.
To explain for myself: when a
Pyis shown, if it has multiple lines then thePython:prefix occurs on its own line, such as with numpy arrays:If you execute code line-by-line from a Julia script in VS Code then it only displays the first line (
"Python:") which is not very informative. So this question is about adding extra info into the first line.