generate_matrices_dataarray#

xarray_einstats.tutorial.generate_matrices_dataarray(seed=None)[source]#

Generate a 4d DataArray representing a batch of matrices.

Parameters:
seedint or sequence of int, optional

The random seed used to initialize numpy.random.default_rng.

Notes

This function is not part of the public API and is designed for use in our documentation. In addition to generating the data, it also sets display_expand_data=False to avoid taking too much virtual space with examples.

Examples

The dataset generated is the following:

from xarray_einstats import tutorial
tutorial.generate_matrices_dataarray(5)
<xarray.DataArray (batch: 10, experiment: 3, dim: 4, dim2: 4)>
1.987 0.7502 1.301 0.5294 0.03015 0.4339 ... 0.3335 0.1952 0.9349 0.02522 0.7594
Dimensions without coordinates: batch, experiment, dim, dim2