SpatioTemporal / GeoData

Module of experimental, but perhaps useful, code not yet stable or proven general enough for inclusion in STARE or pystare.
1 stars 1 forks source link

from_utc missing? #3

Open michaelleerilee opened 2 years ago

michaelleerilee commented 2 years ago

Python complains that pystare does not contain a function named from_utc. Indeed when I looked at the source of pystare there does seem to be references to the from_utc function in the README.md but the function itself is missing (it’s commented out in PySTARE.i and has been since the initial commit).

I assume that the script and its accompanying modules (GeoData and CCL) were written against a version of pystare that had the from_utc function available. Is there some way to emulate this function or is there are function that performs the same operation? from_utc_variable perhaps?

michaelleerilee commented 2 years ago

Will replacing the following

dt=np.array(tm,dtype='datetime64[ms]')
idx=ps.from_utc(dt.astype(np.int64),resolution)

with

dt=np.array(tm,dtype='datetime64[ms]')
idx=ps.from_utc_variable(dt.astype(np.int64),resolution,resolution)

work?