mtuq.Dataset.map

Dataset.map(function, *sequences)[source]

Maps function to all streams

Maps a function to all streams in the Dataset. If one or more optional sequences are given, the function is called with an argument list consisting of corresponding items of each sequence, just like the Python built-in map.

Warning

Although map returns a new Dataset, contents of the original Dataset may still be overwritten, depending on the function. To preserve the original, consider making a copy first.