Skip to content

Commit

Permalink
Merge pull request #4125 from neutrinoceros/fix_numpy_depr
Browse files Browse the repository at this point in the history
ENH: stop using deprecated np.int
  • Loading branch information
matthewturk authored Sep 14, 2022
2 parents a80180a + 8037847 commit b49dc8b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions yt/frontends/athena/data_structures.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,9 +332,9 @@ def _parse_index(self):
).astype("int")

if self.dataset.dimensionality <= 2:
self.dataset.domain_dimensions[2] = np.int(1)
self.dataset.domain_dimensions[2] = 1
if self.dataset.dimensionality == 1:
self.dataset.domain_dimensions[1] = np.int(1)
self.dataset.domain_dimensions[1] = 1

dle = self.dataset.domain_left_edge
dre = self.dataset.domain_right_edge
Expand Down
2 changes: 1 addition & 1 deletion yt/frontends/athena_pp/data_structures.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def _initialize_mesh(self):
nb = np.array([nbx, nby, nbz], dtype="int64")
self.mesh_factors = np.ones(3, dtype="int64") * ((nb > 1).astype("int") + 1)

block_grid = -np.ones((nbx, nby, nbz, nlevel), dtype=np.int)
block_grid = -np.ones((nbx, nby, nbz, nlevel), dtype="int64")
block_grid[log_loc[:, 0], log_loc[:, 1], log_loc[:, 2], levels[:]] = np.arange(
num_blocks
)
Expand Down

0 comments on commit b49dc8b

Please sign in to comment.