Skip to content

Commit

Permalink
run up to _step with dummy_model
Browse files Browse the repository at this point in the history
  • Loading branch information
floriankrb committed Oct 16, 2024
1 parent 6a9dda4 commit 3b89b82
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/anemoi/utils/data_structures.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,9 @@ def __init__(self, arrays, **kwargs):
arrays = {i: v for i, v in enumerate(arrays)}
self.arrays = arrays

def keys(self):
return self.arrays.keys()

def clone(self):
raise NotImplementedError

Expand All @@ -239,8 +242,8 @@ def check_array_type(self, arrays):
assert isinstance(a, _type), (type(a), _type)

def __getitem__(self, tupl):
assert isinstance(tupl, (int, tuple)), type(tupl)
if isinstance(tupl, int):
assert isinstance(tupl, (int, tuple, str)), type(tupl)
if isinstance(tupl, int) or isinstance(tupl, str):
return self.arrays[tupl]
assert len(tupl) == 2
i, j = tupl
Expand Down

0 comments on commit 3b89b82

Please sign in to comment.