KrishnaswamyLab / MAGIC

MAGIC (Markov Affinity-based Graph Imputation of Cells), is a method for imputing missing values restoring structure of large biological datasets.
GNU General Public License v2.0
347 stars 96 forks source link

Suggestions for Unable to allocate 276. GiB for an array with shape (161877, 228942) and data type float64 #203

Open bitcometz opened 2 years ago

bitcometz commented 2 years ago

Hello, Thanks for this great software !!! But I run with some errors:

Code:

magic_operator = magic.MAGIC(n_jobs=80, random_state=1)

Error:

--> 758     data_imputed = diff_op_t.dot(data_imputed)
    760 # fast magic
    761 # a while loop is used when the dimensions of the diffusion matrix
    762 # are greater than those of the data matrix, or when t is not specified
    763 # (so as to allow for the calculation of the optimal t value)
    764 else:
    765     i = 0

MemoryError: Unable to allocate 276. GiB for an array with shape (161877, 228942) and data type float64

Could you give some suggestions ? Thanks !!