From 5db0ee8d1d378cd3bbd8cf52de17074180704528 Mon Sep 17 00:00:00 2001 From: Igor Sugak Date: Fri, 18 Oct 2024 14:12:24 -0700 Subject: [PATCH] Upgrade fbcode/pytorch to Python Scientific Stack 2 (#1387) Summary: Pull Request resolved: https://github.com/pytorch/captum/pull/1387 Differential Revision: D64008689 --- captum/attr/_utils/visualization.py | 1 + 1 file changed, 1 insertion(+) diff --git a/captum/attr/_utils/visualization.py b/captum/attr/_utils/visualization.py index e98282cc9..415a1a404 100644 --- a/captum/attr/_utils/visualization.py +++ b/captum/attr/_utils/visualization.py @@ -75,6 +75,7 @@ def _cumulative_sum_threshold( sorted_vals = np.sort(values.flatten()) cum_sums = np.cumsum(sorted_vals) threshold_id = np.where(cum_sums >= cum_sums[-1] * 0.01 * percentile)[0][0] + # pyre-fixme[7]: Expected `float` but got `ndarray[typing.Any, dtype[typing.Any]]`. return sorted_vals[threshold_id]