We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 013b056 commit 860aad2Copy full SHA for 860aad2
pintxarray/accessors.py
@@ -374,6 +374,11 @@ def dequantify(self):
374
}
375
return Dataset(dequantified_vars, coords=self.ds.coords, attrs=self.ds.attrs)
376
377
+ def to(self, units, **unit_kwargs):
378
+ units = either_dict_or_kwargs(units, unit_kwargs, "to")
379
+
380
+ return conversion.convert_units(self.ds, units)
381
382
def to_base_units(self):
383
base_vars = {name: da.pint.to_base_units() for name, da in self.ds.items()}
384
return Dataset(base_vars, coords=self.ds.coords, attrs=self.ds.attrs)
0 commit comments