alok-ai-lab / pyDeepInsight

A python implementation of the DeepInsight methodology.
GNU General Public License v3.0
157 stars 47 forks source link

ValueError: Input contains NaN, infinity or a value too large for dtype('float64'). #5

Closed scchess closed 3 years ago

scchess commented 3 years ago

Hi. I followed the tutorial but supplied my own RNA gene matrix. It looked a standard gene expression inputs to me. However, I'm getting:

ValueError: Input contains NaN, infinity or a value too large for dtype('float64').

Any idea?

kaboroevich commented 3 years ago

Can you post the full error report? I'm guessing you have nan values in your input, but more information about the error is needed.

Also, what does np.isnan(RNAGeneMatrix).sum() return?

scchess commented 3 years ago

Sorry. I've resolved it. The Python image transformer expected numpy array, but read_csv() gave it a Pandas Dataframe. After I converted the dataframe to a proper numpy array, it all went good.