Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Implicit conversion to a NumPy array is not allowed. Please use .get() to construct a NumPy array explicitly. #67

Open
yambottle opened this issue Nov 25, 2021 · 0 comments

Comments

@yambottle
Copy link

Environment

OS: Ubuntu 20.04
CUDA: 11.0
Cupy: cupy-cuda110==9.6.0

Traceback

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/muser/.local/lib/python3.7/site-packages/datajoint/autopopulate.py", line 153, in populate
    make(dict(key))
  File "/home/muser/.local/lib/python3.7/site-packages/element_array_ephys/ephys_no_curation.py", line 636, in make
    params=params)
  File "/home/muser/.local/lib/python3.7/site-packages/element_array_ephys/readers/kilosort_triggering.py", line 420, in run_pykilosort
    sample_rate=sample_rate)
  File "/usr/local/lib/python3.7/site-packages/pykilosort/main.py", line 189, in run
    out = learnAndSolve8b(ctx)
  File "/usr/local/lib/python3.7/site-packages/pykilosort/learn.py", line 892, in learnAndSolve8b
    dtype=np.float64,
  File "cupy/_core/core.pyx", line 1379, in cupy._core.core.ndarray.__array__
TypeError: Implicit conversion to a NumPy array is not allowed. Please use `.get()` to construct a NumPy array explicitly.

My own exploration

Getting this error at: learn.py line 883

type(pmi[0]) # cupy._core.core.ndarray
type(pmi[0].get()) # numpy.ndarray | which can fix this error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant