Skip to content

Commit 3b47364

Browse files
committed
Merge branch 'release/4.0.0rc2'
2 parents 5c71b8e + 51e081c commit 3b47364

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

doc/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# You can set these variables from the command line.
55
SPHINXOPTS =
66
SPHINXBUILD = sphinx-build
7-
SPHINXPROJ = pyannotecore
7+
SPHINXPROJ = pyannotemetrics
88
SOURCEDIR = source
99
BUILDDIR = build
1010

doc/source/changelog.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
Changelog
33
#########
44

5-
Version 4.0.0rc1 (2025-02-11)
5+
Version 4.0.0rc2 (2025-02-19)
66
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
77

8+
- fix: remove deprecated use of `np.NaN`
89
- BREAKING: drop support to `Python` < 3.10
910
- BREAKING: switch to native namespace package
1011
- setup: switch to `uv`

src/pyannote/metrics/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ def report(self, display: bool = False) -> pd.DataFrame:
164164
if total > 0:
165165
row[key, "%"] = 100 * value / total
166166
else:
167-
row[key, "%"] = np.NaN
167+
row[key, "%"] = np.nan
168168

169169
report.append(row)
170170
uris.append(uri)
@@ -186,7 +186,7 @@ def report(self, display: bool = False) -> pd.DataFrame:
186186
if total > 0:
187187
row[key, "%"] = 100 * value / total
188188
else:
189-
row[key, "%"] = np.NaN
189+
row[key, "%"] = np.nan
190190

191191
row[self.name, "%"] = 100 * abs(self)
192192
report.append(row)

src/pyannote/metrics/spotting.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,8 @@ def _variable_latency(self, reference: Union[Timeline, Annotation],
166166
**kwargs) -> Details:
167167

168168
# pre-compute latencies
169-
speaker_latency = np.NAN * np.ones((len(timestamps), 1))
170-
absolute_latency = np.NAN * np.ones((len(timestamps), 1))
169+
speaker_latency = np.nan * np.ones((len(timestamps), 1))
170+
absolute_latency = np.nan * np.ones((len(timestamps), 1))
171171
if isinstance(reference, Annotation):
172172
reference = reference.get_timeline(copy=False)
173173
if reference:
@@ -206,8 +206,8 @@ def _variable_latency(self, reference: Union[Timeline, Annotation],
206206
target_trial = False
207207

208208
# the notion of "latency" is not applicable to non-target trials
209-
absolute_latency = np.NAN
210-
speaker_latency = np.NAN
209+
absolute_latency = np.nan
210+
speaker_latency = np.nan
211211

212212
return {
213213
SPOTTING_TARGET: target_trial,

0 commit comments

Comments
 (0)