cf.Data.asdatetime

Data.asdatetime(i=False)[source]

Change the internal representation of data array elements from numeric reference times to datatime-like objects.

The change is carried out in place.

If the calendar has not been set then the default CF calendar will be used and the units’ and the calendar attribute will be updated accordingly.

If the internal representations are already datatime-like objects then no change occurs.

Parameters :
i : bool, optional

If True then update the data array in place. By default a new data array is created.

Returns :

out : cf.Data

See also

asreftime

Examples

>>> f.asdatetime()

Previous topic

cf.Data.average

Next topic

cf.Data.asreftime

This Page