Skip to content

Commit b665ab0

Browse files
committed
to_spatial fix
1 parent 9b0290d commit b665ab0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

deepfield/field/rock.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ def __init__(self, *args, **kwargs):
4444
@apply_to_each_input
4545
def _to_spatial(self, attr: str):
4646
"""Spatial order 'F' transformations."""
47+
if getattr(self, attr) is None:
48+
return None
4749
dimens = self.field.grid.dimens.values.reshape(-1)
4850
self.pad_na(attr=attr)
4951
return self.reshape(attr=attr, newshape=dimens, order='F', inplace=True)

0 commit comments

Comments
 (0)