From 1ba8977fa4d2ccddcff3137858a49fb8bbb8b69c Mon Sep 17 00:00:00 2001 From: Igor Sugak Date: Tue, 22 Oct 2024 03:01:42 -0700 Subject: [PATCH] Upgrade fbcode/pytorch to Python Scientific Stack 2 (#1387) Summary: Pull Request resolved: https://github.com/pytorch/captum/pull/1387 Reviewed By: ipazarbasi Differential Revision: D64008689 fbshipit-source-id: 57e74b1e8b1e6f1cd7ce3e1fa67fc0999743bdfe --- 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 986f61c45..223428244 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]