Reference/API¶
Click on any function below to see detailed information.
Creation of Streams¶
Decorator for streaming functions which guarantees that the stream elements will be converted to arrays.
|
Decorates streaming functions to make sure that the stream is a stream of ndarrays. |
The array_stream()
decorator wraps iterables into an ArrayStream
iterator. This is not
required to use the functions defined here, but it provides some nice guarantees.
|
Iterator of arrays. |
Statistical Functions¶
|
Streaming mean of arrays. |
|
Streaming (weighted) average of arrays. |
|
Streaming standard deviation of arrays. |
|
Streaming variance of arrays. |
|
Streaming standard error in the mean (SEM) of arrays. |
|
Streaming histogram calculation. |
The following functions consume entire streams. By avoiding costly intermediate steps, they can perform much faster than their generator versions.
|
Mean of a stream of arrays. |
|
Average (weighted) of a stream of arrays. |
|
Total standard deviation of arrays. |
|
Total variance of a stream of arrays. |
|
Standard error in the mean (SEM) of a stream of arrays. |
|
Calculate the simultaneous average and variance of a stream of arrays. |
Numerics¶
|
Streaming sum of array elements. |
|
Streaming product of array elements. |
|
Subtract elements in a reduction fashion. |
|
Sum of arrays in a stream. |
|
Product of arrays in a stream. |
Linear Algebra¶
|
Yields the cumulative array inner product (dot product) of arrays. |
|
Cumulative inner product of all arrays in a stream. |
|
Yields the cumulative array inner product (dot product) of arrays. |
|
Evaluates the Einstein summation convention on the operands. |
Control Flow¶
|
Pipe arrays through a sequence of functions. |
|
Create a stream of arrays from files, which are loaded lazily. |
|
Create a stream of arrays from files, which are loaded lazily from multiple processes. |
Comparisons¶
|
Test whether any array elements along a given axis evaluate to True. |
|
Test whether all array elements along a given axis evaluate to True |
|
Maximum of a stream of arrays along an axis. |
|
Minimum of a stream of arrays along an axis. |
Parallelization¶
|
Parallel application of a function with keyword arguments. |
|
Parallel application of a function with keyword arguments in no particular order. |
|
Parallel application of the reduce function, with keyword arguments. |
Stacking¶
|
Stack of all arrays from a stream. |
Iterator Utilities¶
|
Retrieve the last item from a stream/iterator, consuming iterables in the process. |
|
Yields cyclic permutations of an iterable. |
|
Split iterable into 'copies'. |
|
Generator yielding multiple iterables of length 'chunksize'. |
|
Generate linear space. |
|
Generate multilinear space, for joining the values in two iterables. |
|
Peek ahead in an iterable. |
|
Decorator that primes a generator function, i.e. runs the function until the first |
|
Return an estimate of the number of items in |
Array Utilities¶
|
Replace NaNs with another fill value. |
Benchmarking¶
|
Benchmark npstreams against numpy and print the results. |