Skip to content

Commit 9abc7ab

Browse files
committed
Typing fixes
1 parent 0ee3bc3 commit 9abc7ab

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

atomlib/vec.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from numpy.typing import ArrayLike, NDArray
99

1010
# re-export to_vec3
11-
from .types import to_vec3, ScalarT
11+
from .types import to_vec3, ScalarT, NumT
1212

1313

1414
def dot(v1: ArrayLike, v2: ArrayLike, axis: int = -1, keepdims: bool = True) -> NDArray[numpy.floating]:
@@ -93,7 +93,7 @@ def polygon_solid_angle(poly: ArrayLike, pts: t.Optional[ArrayLike] = None,
9393
# normalize polygon points to unit sphere
9494
numpy.divide(poly, numpy.linalg.norm(poly, axis=-1, keepdims=True), out=poly)
9595

96-
def _dot(v1: NDArray[numpy.float64], v2: NDArray[numpy.float64]) -> NDArray[numpy.float64]:
96+
def _dot(v1: NDArray[NumT], v2: NDArray[NumT]) -> NDArray[NumT]:
9797
return numpy.add.reduce(v1 * v2, axis=-1)
9898

9999
# next and previous points in polygon

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ classifiers = [
3030
requires-python = ">=3.9"
3131
dependencies = [
3232
"click~=8.1", # for cli
33-
"numpy>=1.22,<2.3.0", # tested on 2.0.0
34-
"scipy~=1.8",
33+
"numpy>=1.22,<2.6.0", # tested on 2.3.1
34+
"scipy~=1.8", # tested on 1.16.0
3535
"polars~=1.31.0",
3636
"matplotlib~=3.5",
3737
"requests~=2.28",

0 commit comments

Comments
 (0)