pandera.strategies.xarray_strategies.data_array_strategyΒΆ

pandera.strategies.xarray_strategies.data_array_strategy(dtype=None, dims=None, sizes=None, shape=None, coords=None, name=None, checks=None, nullable=False, size=None)ΒΆ

Strategy to generate an xarray.DataArray.

Parameters:
  • dtype – numpy dtype or string for the array data.

  • dims (tuple[str, ...] | None) – dimension names.

  • sizes (dict[str, int | None] | None) – mapping of dim name to size.

  • shape (tuple[int | None, ...] | None) – positional shape tuple.

  • coords (dict | None) – mapping of coord name to values/strategy.

  • name (str | None) – name for the DataArray.

  • checks (Sequence | None) – (unused) reserved for future check-aware generation.

  • nullable (bool) – if True, sprinkle NaN values.

  • size (int | None) – default size for dimensions without an explicit size.

Return type:

SearchStrategy

Returns:

hypothesis strategy producing xr.DataArray.