Convert to integers with units of microseconds since 1970-01-01.
(self)
| 673 | |
| 674 | @property |
| 675 | def asi8(self): |
| 676 | """Convert to integers with units of microseconds since 1970-01-01.""" |
| 677 | from xarray.core.resample_cftime import exact_cftime_datetime_difference |
| 678 | |
| 679 | if not self._data.size: |
| 680 | return np.array([], dtype=np.int64) |
| 681 | |
| 682 | epoch = self.date_type(1970, 1, 1) |
| 683 | return np.array( |
| 684 | [ |
| 685 | _total_microseconds(exact_cftime_datetime_difference(epoch, date)) |
| 686 | for date in self.values |
| 687 | ], |
| 688 | dtype=np.int64, |
| 689 | ) |
| 690 | |
| 691 | @property |
| 692 | def calendar(self): |
nothing calls this directly
no test coverage detected