Skip to content

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

@drewyangdev

Description

@drewyangdev

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions