On Tue, Aug 21, 2018 at 6:47 PM Nathaniel Smith <njs@pobox.com> wrote:

It is quite possible that NumPy functions could be (re)written in a way

On Tue, Aug 21, 2018 at 9:39 AM, Stephan Hoyer <shoyer@gmail.com> wrote: 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.