jupyterlab-variableInspector icon indicating copy to clipboard operation
jupyterlab-variableInspector copied to clipboard

Cannot open the matrix view if pandas is not imported

Open Pandede opened this issue 2 years ago • 0 comments

I found out a bug that the matrix cannot be viewed in detail if pandas is not imported For example, The matrix cannot be viewed with following code:

import numpy as np
a = np.ones((50,50))

But, this works fine:

import numpy as np
import pandas as pd
a = np.ones((50,50))

This bug maybe occurred because of this line: https://github.com/lckr/jupyterlab-variableInspector/blob/70220c75ec8047ebdec38e5123915073a084e8ed/src/inspectorscripts.ts#L207-L209 But I do not confirm about this, maybe someone can test on it?

I think it'll be better if pandas can be automatically imported when viewing matrix.

Pandede avatar Jun 24 '22 17:06 Pandede