Skip to content

Commit

Permalink
fix: fix support for NumPy 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ibevers authored Jun 19, 2024
1 parent cd3f550 commit 50b21d4
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## develop

### Fixes

- fix: fix support for `numpy==2.x` ([@ibevers](https://github.com/ibevers/))

## Version 3.3.0 (2024-06-14)

### TL;DR
Expand Down
2 changes: 1 addition & 1 deletion pyannote/audio/core/inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ def aggregate(
warm_up: Tuple[float, float] = (0.0, 0.0),
epsilon: float = 1e-12,
hamming: bool = False,
missing: float = np.NaN,
missing: float = np.nan,
skip_average: bool = False,
) -> SlidingWindowFeature:
"""Aggregation
Expand Down
2 changes: 1 addition & 1 deletion pyannote/audio/tasks/segmentation/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ def validation_step(self, batch, batch_idx: int):
)

# reshape target so that there is one line per class when plotting it
y[y == 0] = np.NaN
y[y == 0] = np.nan
if len(y.shape) == 2:
y = y[:, :, np.newaxis]
y *= np.arange(y.shape[2])
Expand Down
2 changes: 1 addition & 1 deletion pyannote/audio/tasks/segmentation/speaker_diarization.py
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,7 @@ def validation_step(self, batch, batch_idx: int):
)

# reshape target so that there is one line per class when plotting it
y[y == 0] = np.NaN
y[y == 0] = np.nan
if len(y.shape) == 2:
y = y[:, :, np.newaxis]
y *= np.arange(y.shape[2])
Expand Down
2 changes: 1 addition & 1 deletion pyannote/audio/tasks/separation/PixIT.py
Original file line number Diff line number Diff line change
Expand Up @@ -1136,7 +1136,7 @@ def validation_step(self, batch, batch_idx: int):
)

# reshape target so that there is one line per class when plotting it
y[y == 0] = np.NaN
y[y == 0] = np.nan
if len(y.shape) == 2:
y = y[:, :, np.newaxis]
y *= np.arange(y.shape[2])
Expand Down

0 comments on commit 50b21d4

Please sign in to comment.