# 需要导入模块: import xarray [as 别名]# 或者: from xarray importVariable[as 别名]defbase(self):"""Base dataset this instance gets its data from"""ifself._baseisNone:if'variable'inself.arr.dims:defto_dataset(i):ret = self.isel(variable=i).to_dataset( name=self.arr.coords['variable...
I don't think we need to change the signature of xarray functions to support "hashable or sequence of hashable". It's OK if convenience features (like support for passing in only a single argument as a string) don't work in all cases. I agree that it would be a good idea to use ...
Datasets implement the mapping interface with keys given by variable names and values given by DataArray objects. .. autosummary:: :toctree: generated/ Dataset.__getitem__ Dataset.__setitem__ Dataset.__delitem__ Dataset.update Dataset.get Dataset.items Dataset.keys Dataset.values Dataset conten...
# 需要导入模块: import xarray [as 别名]# 或者: from xarray importCFTimeIndex[as 别名]defget_time_decoded(self, midpoint=True):"""Return time decoded. """# to compute a time midpoint, we need a time_bound variableifmidpointandself.time_boundisNone:raiseValueError('cannot compute time mi...
def as_variable(obj, name=None): """Convert an object into a Variable. Parameters --- obj : object Object to convert into a Variable. - If the object is already a Variable, return a shallow copy. - Otherwise, if the object has 'dims' and 'data' attributes, convert it into a...
Workflow Run URL Python 3.11 Test Summary xarray/tests/test_backends.py::TestZarrDictStore::test_roundtrip_example_1_netcdf: ImportError: numpy.core.multiarray failed to import (auto-generated because you didn't call 'numpy.import_array(...
The character dimension name can be specifed by the char_dim_name field of a variable's encoding. If this is not specified the default name for the character dimension is 'string%s' % data.shape[-1]. When decoding character arrays from existing files, the char_dim_name is added to the...
Saved searches Use saved searches to filter your results more quickly Cancel Create saved search Sign in Sign up Reseting focus {{ message }} jfpx / xarray Public forked from pydata/xarray Notifications You must be signed in to change notification settings Fork 0 Star 0...
Cancel Create saved search Sign in Sign up {{ message }} tsanona / xarray Public forked from pydata/xarray Notifications You must be signed in to change notification settings Fork 0 Star 0 Code Pull requests Actions Projects Security Insights ...
Translate from cell measures to appropriate variable name. This function interprets the ``cell_measures`` attribute on DataArrays.Parameters --- obj : DataArray, Dataset DataArray belonging to the coordinate to be checked key : str key to check...