[Numpy-discussion] Proposal to accept NEP-18, __array_function__ protocol
Stephan Hoyer
shoyer at gmail.com
Wed Aug 22 12:26:58 EDT 2018
On Tue, Aug 21, 2018 at 6:47 PM Nathaniel Smith <njs at pobox.com> wrote:
> On Tue, Aug 21, 2018 at 9:39 AM, Stephan Hoyer <shoyer at gmail.com> wrote:
> > It is quite possible that NumPy functions could be (re)written in a way
> that
> > is incompatible with some unit implementations but is perfectly valid for
> > "full" duck arrays. We actually see this even within NumPy already -- for
> > example, see this recent PR adding support for the datetime64 dtype to
> > percentile:
> > https://github.com/numpy/numpy/pull/11627
>
> I clicked the link, but I don't see anything about units?
>
To clarify: np.datetime64 arrays can be considered a variant of NumPy
arrays that support units. Namely, they use a dtype for representing time
units.
I expect that the issues we've encountered with datetime64 will be
indicative of some of the sort of issues that authors of unit-aware arrays
will encounter.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20180822/fa86bfbd/attachment.html>
More information about the NumPy-Discussion
mailing list