[Numpy-discussion] Making datetime64 timezone naive

Stephan Hoyer shoyer at gmail.com
Tue Oct 13 13:36:29 EDT 2015


On Mon, Oct 12, 2015 at 12:38 AM, Nathaniel Smith <njs at pobox.com> wrote:

>
> One possible strategy here would be to do some corpus analysis to find
> out whether anyone is actually using it, like I did for the ufunc ABI
> stuff:
>   https://github.com/njsmith/codetrawl
>   https://github.com/njsmith/ufunc-abi-analysis
>
> "datetime_to_string" is an easy token to search for, though it looks
> like enough people have their own functions named that that you'd have
> to do a bit of filtering to ignore non-numpy-related uses.


Yes, this is a good approach. I actually mistyped the name here -- it's
actually "datetime_as_string". A GitHub search does turn up a handful of
uses outside of NumPy:
https://github.com/search?utf8=%E2%9C%93&q=numpy.datetime_as_string+in%3Afile%2Cpath+NOT+numpy%2Fcore+NOT+test_datetime.py+NOT+arrayprint.py&type=Code&ref=searchresults

That said, I'm not sure it's worth going to the trouble to ensure it
continues to work in the future. This function was entirely undocumented,
and doesn't even have an inspectable function signature.

Stephan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20151013/3ea21146/attachment.html>


More information about the NumPy-Discussion mailing list