nctoolkit.DataSet.as_type

nctoolkit.DataSet.as_type#

DataSet.as_type(x)#

Set a variable/dimension to double This is mostly useful for cases when time is stored as an int, but you need a double

Parameters:

x (dict) – A dictionary mapping variables to type. Values in dict must be one of ‘int’, ‘float32’ and ‘float64’.

Examples

Change time to float64: >>> ds.as_type({‘time’: ‘float64’})