from_ms_since_epoch_utc#

from_ms_since_epoch_utc(ms_since_epoch_utc, forward_resolution=48, reverse_resolution=48)#

Converts an integer of milliseconds since unix epoch in UTC to TIV.

Parameters:
ms_since_epoch_utc: array-like of ints

milliseconds since unix epoch in UTC

forward_resolution: int. Valid range is 0..48

The forward resolution (c.f coarsest_resolution_finer_or_equal_ms())

reverse_resolution: int. Valid range is 0..48

The reverse resolution (c.f. coarsest_resolution_finer_or_equal_ms()

Returns:
tivs: numpy array

temporal index values

Examples

>>> import numpy
>>> import pystare
>>> timestamps = numpy.array(['2021-01-03'], dtype='datetime64[ms]')
>>> ms_since_epoch = timestamps.astype(numpy.int64)
>>> pystare.from_ms_since_epoch_utc(ms_since_epoch_utc=ms_since_epoch, forward_resolution=48, reverse_resolution=48)
array([2275448110396223681])