Skip to content

Commit

Permalink
fix ArrowDecoder.decode to return instead of yield
Browse files Browse the repository at this point in the history
  • Loading branch information
lostella committed Aug 22, 2023
1 parent 482e940 commit 40dd317
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gluonts/dataset/arrow/dec.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def from_schema(cls, schema):
)

def decode(self, batch, row_number: int):
yield from self.decode_batch(batch.slice(row_number, row_number + 1))
return next(self.decode_batch(batch.slice(row_number, row_number + 1)))

def decode_batch(self, batch):
for row in batch.to_pandas().to_dict("records"):
Expand Down

0 comments on commit 40dd317

Please sign in to comment.