Skip to content

Commit 49d8ffa

Browse files
committed
ArrayContext.zeros: accept DTypeLike
1 parent 3aedca5 commit 49d8ffa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

arraycontext/context.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@
135135

136136
if TYPE_CHECKING:
137137
import numpy as np
138+
from numpy.typing import DTypeLike
138139

139140
import loopy
140141
from pytools.tag import ToTagSetConvertible
@@ -223,7 +224,7 @@ def __hash__(self) -> int:
223224

224225
def zeros(self,
225226
shape: int | tuple[int, ...],
226-
dtype: np.dtype[Any]) -> Array:
227+
dtype: DTypeLike) -> Array:
227228
warn(f"{type(self).__name__}.zeros is deprecated and will stop "
228229
"working in 2025. Use actx.np.zeros instead.",
229230
DeprecationWarning, stacklevel=2)

0 commit comments

Comments
 (0)