scipp.testing.strategies.dataarrays#

scipp.testing.strategies.dataarrays(*, data_args=None, coords=True, coord_args=None, masks=True, mask_args=None, bin_edges=True)#

Generate data arrays with coords and masks.

The data variable can be any variable supported by scipp.testing.strategies.variables. The coordinates and masks are constrained to be one-dimensional where the dimension is one of the dims of the data. The name of a coordinate or mask may be, but is not required to be, a dimension name.

Parameters:
  • draw – Provided by Hypothesis.

  • data_args (Optional[dict[str, Any]], default: None) – Arguments for creating the data variable.

  • coords (bool, default: True) – Selects whether coords are generated.

  • coord_args (Optional[dict[str, Any]], default: None) – Arguments for creating the coordinate variable.

  • masks (bool, default: True) – Selects whether masks are generated.

  • mask_args (Optional[dict[str, Any]], default: None) – Arguments for creating the mask variable.

  • bin_edges (bool, default: True) – If True, coords may be bin edges.

See also

scipp.testing.strategies.variables

For allowed items in *_args dicts.

Return type:

SearchStrategy[DataArray]