I don't particularly need this, although it would be nice to make this
behavior explicit, instead of happening more or less by accident:

    In [1]: from yt.units import km

    In [2]: import numpy as np

    In [3]: data = [1, 2, 3]*km

    In [4]: np.ones_like(data)
    Out[4]: YTArray([1., 1., 1.]) km


On Fri, May 18, 2018 at 9:51 AM, Marten van Kerkwijk <
m.h.vankerkw...@gmail.com> wrote:

> I'm greatly in favour, especially if the same can be done for
> `zeros_like` and `empty_like`, but note that a tricky part is that
> ufuncs do not deal very graciously with structured (void) and string
> dtypes. -- Marten
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion@python.org
> https://mail.python.org/mailman/listinfo/numpy-discussion
>
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion

Reply via email to