Skip to content

Commit

Permalink
reverted a couple of edits
Browse files Browse the repository at this point in the history
  • Loading branch information
nfarabullini committed Jan 4, 2024
1 parent 762d7eb commit fa1c588
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/gt4py/next/embedded/nd_array_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,13 +161,15 @@ def from_array(
return cls(domain, array)

def remap(
self: NdArrayField, connectivity: common.ConnectivityField
self: NdArrayField, connectivity: common.ConnectivityField | fbuiltins.FieldOffset
) -> NdArrayField:
# For neighbor reductions, a FieldOffset is passed instead of an actual ConnectivityField
if not common.is_connectivity_field(connectivity):
assert isinstance(connectivity, fbuiltins.FieldOffset)
connectivity = connectivity.as_connectivity_field()

assert common.is_connectivity_field(connectivity)

# Compute the new domain
dim = connectivity.codomain
dim_idx = self.domain.dim_index(dim)
Expand Down

0 comments on commit fa1c588

Please sign in to comment.