From 9cfbe00da6cc24c9afa7154bac35d08752d7f1ac Mon Sep 17 00:00:00 2001 From: David Manthey Date: Wed, 16 Oct 2024 10:09:57 -0400 Subject: [PATCH] Refactor to avoid mypy issues --- src/dicomweb_client/file.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dicomweb_client/file.py b/src/dicomweb_client/file.py index d873be6..3e16c80 100644 --- a/src/dicomweb_client/file.py +++ b/src/dicomweb_client/file.py @@ -568,7 +568,7 @@ def __init__( # numpy 2 no longer has prod, but Python >= 3.8 does. We either have # one or the other, so use the python math.prod method when available # and fall abck to np if not. - self._prod = math.prod if hasattr(math, 'prod') else np.prod + self._prod = getattr(math, 'prod', np.prod) self._attributes = { _QueryResourceType.STUDIES: self._get_attributes(