xarray_copy_kw
- PlasmaCalcs.tools.xarray_tools.xarray_misc.xarray_copy_kw(array, dims=None, *, name=None, array_to_dataset=False)
return dict of info suitable for creating a similar array or dataset.
result includes dims, coords, and attrs (unchanged, copied).dims: None, str, or iterable of strif provided, only include these dims (and related coords) in the result.Useful if only interested in some of the dims,e.g. if array has x,y,z,t dims but only want to mimic dims and coords from x,t.name: None, bool, or strwhether to also include name in resultNone –> True if array has name, else FalseTrue –> name = array.name.str –> name = name.array_to_dataset: boolif True, result will be suitable for creating a Dataset based on the input DataArray.(Equivalent to using dims=[], name=False, and deleting ‘dims’ key from result.)