npstreams.ArrayStream¶
-
class
npstreams.
ArrayStream
(stream)¶ Iterator of arrays. Elements from the stream are converted to NumPy arrays. If
stream
is a single array, it will be repackaged as a length 1 iterable.Arrays in the stream will be cast to the same data-type as the first array in the stream. The stream data-type is located in the dtype attribute.
New in version 1.5.2.
-
__init__
(stream)¶ Initialize self. See help(type(self)) for accurate signature.
Methods
__init__
(stream)Initialize self. -
__array__
()¶ Returns a dense array created from this stream.
-
__init__
(stream) Initialize self. See help(type(self)) for accurate signature.
-
__length_hint__
()¶ In certain cases, an ArrayStream can have a definite size. See https://www.python.org/dev/peps/pep-0424/
-
__next__
()¶ Return the next item from the iterator. When exhausted, raise StopIteration
-
__repr__
()¶ Verbose string representation
-