Hi all

On Friday, Oct 19, 2018 at 10:28 AM, Matti Picus <matti.picus@gmail.com> wrote:

Was there discussion around which of `asarray` or asanyarray` to prefer? PR 11162, https://github.com/numpy/numpy/pull/11162, proposes `asanyarray` in place of `asarray` at the entrance to `_quantile_ureduce_func` to preserve ndarray subclasses. Should we be looking into changing all the `asarray` calls into `asanyarray`?

I suspect that this will cause a large number of problems around np.matrix, so unless we deprecate that, this might cause a large amount of problems. The problem with np.matrix is that it’s a subclass, but it’s not substitutable for the base class, and so violates SOLID.

There are efforts to remove np.matrix, with the largest consumer being scipy.sparse, so unless that’s revamped, deprecating np.matrix is kind of hard to do.


NumPy-Discussion mailing list

Best Regards,
Hameer Abbasi