Skip to content

Commit b4c7ea9

Browse files
hawkinspTF Object Detection Team
authored andcommitted
[numpy] Fix users of NumPy APIs that are removed in NumPy 2.0.
This change migrates users of APIs removed in NumPy 2.0 to their recommended replacements (https://numpy.org/doc/stable/numpy_2_0_migration_guide.html). This CL makes the following changes: * `np.NAN` -> `np.nan` PiperOrigin-RevId: 659605386
1 parent 34f03db commit b4c7ea9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

research/object_detection/utils/metrics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def compute_average_precision(precision, recall):
9090
if precision is None:
9191
if recall is not None:
9292
raise ValueError("If precision is None, recall must also be None")
93-
return np.NAN
93+
return np.nan
9494

9595
if not isinstance(precision, np.ndarray) or not isinstance(
9696
recall, np.ndarray):

0 commit comments

Comments
 (0)