Tridesclous error when running on a Windows 11 fresh install: ""module 'numpy' has no attribute 'in1d'""
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 85/100
Research direction
The traceback points to tridesclous/pruningshears.py, in explore_split_loop, where np.in1d raises an AttributeError. Read that function and check for other affected uses, then run the relevant Tridesclous tests; done when the reported error no longer occurs with the installed NumPy version.
Written by the indexing model from the issue text.
Description
Hi, I've been testing a range of sorters with a fresh install on Windows 11 and here is bugs that happens with Tridesclous:
"module 'numpy' has no attribute 'in1d'"
I think due to the fact that it is using a deprecated numpy function ( in1d instead of isin, see https://numpy.org/doc/2.2/reference/generated/numpy.in1d.html) in explore_split_loop`.
Here's the latest lines of the error:
labels = pruningshears.do_the_job()
File "C:\Users\eleonord.conda\envs\spint\Lib\site-packages\tridesclous\pruningshears.py", line 135, in do_the_job
cluster_labels = self.explore_split_loop()
File "C:\Users\eleonord.conda\envs\spint\Lib\site-packages\tridesclous\pruningshears.py", line 697, in explore_split_loop
ind_trash_label = ind_l0[np.in1d(labels_l0, bad_labels)]
^^^^^^^
File "C:\Users\eleonord.conda\envs\spint\Lib\site-packages\numpy_init_.py", line 769, in getattr
raise AttributeError(f"module {name!r} has no attribute {attr!r}")
AttributeError: module 'numpy' has no attribute 'in1d'. Did you mean: 'int16'?
This happens both with a toy dataset or with real data.
Solution: replacing np.in1d with np.isin in tridesclous.pruningshears seems to fix the error. Should I submit this somewhere else? Thanks!
- Dominant language
- Python
- Stars
- 858
- Forks
- 281
- Avg merge
- 4d 19m
- Merged PRs (30d)
- 47
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from SpikeInterface/spikeinterface
-
testing
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
SpikeInterface/spikeinterface#4756 ·
Maintainers usually reply within 2 days
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
SpikeInterface/spikeinterface#4510 · 2 comments ·
Maintainers usually reply within 2 days
-
Process channels in banks in preprocessors to reduce RAM usagePossibly taken @h-mayorquin claimed this 4 days ago. Openperformance preprocessing
SpikeInterface/spikeinterface#4837 · 2 comments · 1 assignee ·
Maintainers usually reply within 2 days
-
Extend `TimeSeriesExecutor` to `num_chunks_per_job`Possibly taken @samuelgarcia claimed this 5 days ago. Openconcurrency
SpikeInterface/spikeinterface#4831 · 1 comment · 1 assignee ·
Maintainers usually reply within 2 days
-
enhancement motion correction
Difficulty 3/5 Half a day Newbie friendliness 65/100
SpikeInterface/spikeinterface#4829 · 2 comments · 1 reaction ·
Maintainers usually reply within 2 days
All issues in SpikeInterface/spikeinterface
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 63/100
GAM-team/got-your-back#547 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
UKGovernmentBEIS/inspect_ai#5821 ·
Maintainers usually reply within 1 day
-
docs help wanted
Difficulty 1/5 1-3 hours Newbie friendliness 75/100
-
evidence wanted good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
open-coder-ai/agentseam#195 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day