Skip to content

Commit b4ee967

Browse files
committed
BUG: fix an incompatibility with numpy 1.20
1 parent 8c26622 commit b4ee967

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/PIL/_typing.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
try:
88
import numpy.typing as npt
99

10-
NumpyArray = npt.NDArray[Any]
11-
except ImportError:
10+
NumpyArray = npt.NDArray[Any] # requires numpy>=1.21
11+
except (ImportError, AttributeError):
1212
pass
1313

1414
if sys.version_info >= (3, 10):

0 commit comments

Comments
 (0)