Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン 初心者向け
#4,842 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
1/5
見積もり時間
1時間未満
初心者へのやさしさ
85/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
numpy, python
領域
data

調査の方向性

トレースバックは tridesclous/pruningshears.py の explore_split_loop を指しており、そこで np.in1d が AttributeError を発生させます。その関数を読み、ほかに影響を受ける使用箇所がないか確認してから、関連する Tridesclous のテストを実行してください。インストール済みの NumPy のバージョンで報告されたエラーが発生しなくなれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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!

主要言語
Python
スター
859
フォーク
286
平均マージ
3日 16時間
マージ済み PR(30日)
52

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

SpikeInterface/spikeinterface のほかの issue

SpikeInterface/spikeinterface の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。