MAGIC icon indicating copy to clipboard operation
MAGIC copied to clipboard

Name of the package confused with python-magic package

Open Rohit-Satyam opened this issue 2 years ago • 0 comments

Describe the bug

AttributeError                            Traceback (most recent call last)
Cell In[37], line 4
      1 import magic
      3 # Apply MAGIC for PCA data denoising
----> 4 magic_op = magic.MAGIC(random_state=random_seed, solver='approximate', n_pca=n_comps)
      5 X_magic = magic_op.fit_transform(data.X, genes='pca_only')
      6 data.obsm['X_magic_pca'] = X_magic

AttributeError: module 'magic' has no attribute 'MAGIC'

The error module 'magic' has no attribute 'MAGIC' is due to the fact that magic-impute is imported as magic and also python-magic is also imported in a similar fashion. I thought uninstalling python-magic would fix the issue but the issue persists. Can you improve the naming so that it does not conflict with the magic package for images?

Rohit-Satyam avatar Jul 02 '23 17:07 Rohit-Satyam