Skip to content

Instantly share code, notes, and snippets.

@spencerkclark
Created May 10, 2020 15:35
Show Gist options
  • Save spencerkclark/e8f9aed41acd8f524cef38706b3622b5 to your computer and use it in GitHub Desktop.
Save spencerkclark/e8f9aed41acd8f524cef38706b3622b5 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jswhit
Copy link

jswhit commented May 11, 2020

Since this uses numpy datetime64, does it only work for the proleptic gregorian calendar?

@spencerkclark
Copy link
Author

Thanks for having a look @jswhit -- I only use numpy.timedelta64 here as a conduit to converting an array of integers to an array of datetime.timedelta objects, and then add those datetime.timedelta objects to the basedate (which could be of any calendar type). For that reason I think it should be calendar-agnostic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment