Stream
The Stream module contains the classes Stream
and BlockStream
.
-
class
streaming.stream.
Stream
(iterator)[source]
Bases: streaming.abstractstream.AbstractStream
Stream of samples.
-
drop
(nsamples)[source]
Drop the first n samples.
-
take
(nsamples)[source]
Take the first nsamples samples.
-
class
streaming.stream.
BlockStream
(iterator, nblock, noverlap=0)[source]
Bases: streaming.abstractstream.AbstractStream
Stream of blocks of samples.
-
drop
(n)[source]
Drop the first n blocks.
Note
If you want to drop n samples, use s.samples().drop(n).
-
map
(func)[source]
Map func to each block in BlockStream
.
-
mean
()[source]
Mean value calculated over nblock samples.
This function returns a Stream
.
-
nblocks
()[source]
Amount of blocks in stream.
Warning
This consumes the stream.
-
samples
()[source]
Iterate over samples.
Returns: | Stream of samples insteads of blocks. Possible overlap is taking into account. |
-
std
()[source]
Standard deviation calculated over nblock samples.
This function returns a Stream
.
-
sum
()[source]
Sum calculated over nblock samples.
This function returns a Stream
.
-
take
(nblocks)[source]
Take nblocks from stream.
-
var
()[source]
Variance calculated over nblock samples.
This function returns a Stream
.
-
streaming.stream.
count
(start=0, step=1)[source]
Count.