Last updated: 2023-03-16.
tf_quant_finance.experimental.io.ArrayDictReader#
Iterator over the data serialized by ArrayDictWriter.
tf_quant_finance.experimental.io.ArrayDictReader(
path
)
The reader counterpart of the ArrayDictWriter. It deserializes the binary
tfrecords files written by the writer.
Provides an iterable interface.
Example#
filename = '...'
reader = ArrayDictReader(filename)
# Read one record.
first_record = next(reader)
for record in reader:
print(record) # Print the rest of the records.
Methods#
__iter__
__iter__()
next
next()
Returns the next record if there is one or raises StopIteration.