Skip to content

Commit

Permalink
fixed issue with type subscription for python <3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
jobdewitte committed Jan 23, 2025
1 parent 23f7047 commit 5faf7dc
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions traceon/_typing/_array_like.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,12 @@

import numpy as np

_NumpyFloat: TypeAlias = np.dtype[np.floating]
_NumpyInt: TypeAlias = np.dtype[np.integer]
if sys.version_info >= (3, 9):
_NumpyFloat: TypeAlias = np.dtype[np.floating]
_NumpyInt: TypeAlias = np.dtype[np.integer]
else:
_NumpyFloat: TypeAlias = np.dtype
_NumpyInt: TypeAlias = np.dtype

_ShapeLike: TypeAlias = tuple[int, ...]

Expand Down

0 comments on commit 5faf7dc

Please sign in to comment.