Skip to content

Commit

Permalink
implement index in field
Browse files Browse the repository at this point in the history
  • Loading branch information
b8raoult committed Sep 14, 2024
1 parent 5eab711 commit 3068f2f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/ai_models/inputs/transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ def to_numpy(self, flatten=False, dtype=None, index=None):
data = data.astype(dtype)
if flatten:
data = data.flatten()
if index is not None:
data = data[index]
return data

def __getattr__(self, name):
Expand Down

0 comments on commit 3068f2f

Please sign in to comment.