Skip to content

numpy.NAN deprecated with numpy 1.26 and pyannote 3 #1941

@Artpel1805

Description

@Artpel1805

Tested versions

  • Python Version 3.13
  • Numpy version <= 1.26.4
  • pyannote.audio <= 3.3.1

System information

MacOS 15.6.1

Issue description

In pyannote/audio/pipelines/speaker_diarization.py
Permalink to code

Line 403
clustered_segmentations = np.NAN * np.zeros(
should use
clustered_segmentations = np.nan * np.zeros(
according to https://numpy.org/doc/1.26/reference/constants.html

It creates an error when calling

Pipeline.from_pretrained

Minimal reproduction example (MRE)

ask-if-needed

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