hydromt.gis.Dataset.raster.from_numpy#
- static gis.Dataset.raster.from_numpy(data_vars, transform, attrs=None, crs=None)#
Transform multiple numpy arrays to a Dataset object.
The arrays should have identical shape.
- Parameters:
data_vars (
- dict-like
) –A mapping from variable names to numpy arrays. The following notations are accepted:
{var_name: array-like}
{var_name: (array-like, nodata)}
{var_name: (array-like, nodata, attrs)}
transform (
affine transform
) – Two dimensional affine transform for 2D linear mappingattrs (
dict
, optional) – additional global attributescrs (
int
,dict
, orstr
, optional) – Coordinate Reference System. Accepts EPSG codes (int or str); proj (str or dict)
- Returns:
ds – Dataset of data_vars arrays
- Return type:
xr.Dataset