Skip to content

Commit 80d9749

Browse files
Fixing bug in attrgetr for dataset
1 parent 486765d commit 80d9749

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

parcels/particleset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ def __init__(
161161
for v in pclass.__dict__.values():
162162
if isinstance(v, Variable):
163163
if isinstance(v.initial, attrgetter):
164-
initial = v.initial(self).values
164+
initial = v.initial(self._ds).values
165165
else:
166166
initial = v.initial * np.ones(len(trajectory_ids), dtype=v.dtype)
167167
self._ds[v.name] = (["trajectory"], initial)

0 commit comments

Comments
 (0)