|
20 | 20 | if typing.TYPE_CHECKING: |
21 | 21 | from typing import (Dict, Any, Mapping, List, Iterator, Tuple, Optional, |
22 | 22 | Callable) |
23 | | - from numpy import ndarray, signedinteger |
| 23 | + from numpy import ndarray |
24 | 24 | from pandas import DataFrame, Series |
25 | 25 | from .datatypes import Varf |
26 | 26 | from .stagyydata import StagyyData |
@@ -210,22 +210,22 @@ def threed(self) -> bool: |
210 | 210 | """Whether the grid is 3 dimensional.""" |
211 | 211 | return not self.twod |
212 | 212 |
|
213 | | - def at_z(self, zval: float) -> signedinteger: |
| 213 | + def at_z(self, zval: float) -> int: |
214 | 214 | """Return iz closest to given zval position. |
215 | 215 |
|
216 | 216 | In spherical geometry, the bottom boundary is considered to be at z=0. |
217 | 217 | Use :meth:`at_r` to find a cell at a given radial position. |
218 | 218 | """ |
219 | 219 | if self.curvilinear: |
220 | 220 | zval += self.rcmb |
221 | | - return np.argmin(np.abs(self.z_centers - zval)) |
| 221 | + return int(np.argmin(np.abs(self.z_centers - zval))) |
222 | 222 |
|
223 | | - def at_r(self, rval: float) -> signedinteger: |
| 223 | + def at_r(self, rval: float) -> int: |
224 | 224 | """Return ir closest to given rval position. |
225 | 225 |
|
226 | 226 | If called in cartesian geometry, this is equivalent to :meth:`at_z`. |
227 | 227 | """ |
228 | | - return np.argmin(np.abs(self.r_centers - rval)) |
| 228 | + return int(np.argmin(np.abs(self.r_centers - rval))) |
229 | 229 |
|
230 | 230 |
|
231 | 231 | class _Fields(abc.Mapping): |
|
0 commit comments