Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Tridesclous error when running on a Windows 11 fresh install: ""module 'numpy' has no attribute 'in1d'""

Open Beginner friendly
#4,842 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
85/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
numpy, python
Domain
data

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from SpikeInterface/spikeinterface

All issues in SpikeInterface/spikeinterface

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.