Skip to content

Commit

Permalink
ran pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
nfarabullini committed Jan 5, 2024
1 parent 09a4c44 commit 9f2bcc6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gt4py/next/embedded/nd_array_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,12 +200,12 @@ def remap(
offset_abs = [
restricted_connectivity.ndarray
if d == dim
else np.indices(restricted_connectivity.shape)[d_i]
else np.indices(restricted_connectivity.ndarray.shape)[d_i]
for d_i, d in enumerate(new_domain.dims)
]
arr_i_abs = np.arange(np.prod(self.shape)).reshape(self.shape)
new_buffer_flat = xp.take(self._ndarray.flatten(), arr_i_abs[tuple(offset_abs)].flatten()) # type: ignore[attr-defined] # mypy does not recognize flatten()
new_buffer = new_buffer_flat.reshape(restricted_connectivity.shape)
new_buffer = new_buffer_flat.reshape(restricted_connectivity.ndarray.shape)
else:
new_idx_array = xp.asarray(restricted_connectivity.ndarray) - current_range.start
# finally, take the new array
Expand Down

0 comments on commit 9f2bcc6

Please sign in to comment.