From 831888a5f7f02fbfecc381270c173b3baf61d37f Mon Sep 17 00:00:00 2001 From: Igor Sugak Date: Tue, 12 Sep 2023 16:51:21 -0700 Subject: [PATCH] s,np.bool\b,bool, Summary: X-link: https://github.com/facebookresearch/simmc/pull/63 X-link: https://github.com/facebookresearch/Generic-Grouping/pull/16 X-link: https://github.com/facebookresearch/Detectron/pull/1047 X-link: https://github.com/facebookincubator/zstrong/pull/582 `np.bool` and `bool` are identical, but the former is removed from Numpy-1.24.X. Differential Revision: D49196618 --- ava_evaluation/metrics.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ava_evaluation/metrics.py b/ava_evaluation/metrics.py index 47116fac..de95b644 100644 --- a/ava_evaluation/metrics.py +++ b/ava_evaluation/metrics.py @@ -38,7 +38,7 @@ def compute_precision_recall(scores, labels, num_gt): """ if ( not isinstance(labels, np.ndarray) - or labels.dtype != np.bool + or labels.dtype != bool or len(labels.shape) != 1 ): raise ValueError("labels must be single dimension bool numpy array")