On Mon, Feb 10, 2014 at 11:16 AM, Alexander Belopolsky <ndar...@mac.com> wrote: > > On Sun, Feb 9, 2014 at 4:59 PM, alex <argri...@ncsu.edu> wrote: >> >> On the other hand, it really needs to be deprecated. > > > While numpy.matrix may have its problems, a NEP should list a better > rationale than the above to gain acceptance. > > Personally, I decided not to use numpy.matrix in production code about 10 > years ago and never looked back to that decision. I've heard however that > some of the worst inheritance warts have been fixed over the years. I also > resisted introducing inheritance in the implementation of masked arrays, > but I lost that argument. For better or worse, inheritance from ndarray is > here to stay and I would rather see numpy.matrix stay as a test-bed for > fixing inheritance issues rather than see it deprecated and have the same > issues pop up in ma or elsewhere.
In practice, the existence of np.matrix doesn't seem to have any affect on whether inheritance issues get fixed. And in the long run, I think the goal is to move people away from inheriting from np.ndarray. Really the only good reason to inherit from np.ndarray right now, is if there's something you want to do that is impossible without using inheritance. But we're working on fixing those issues (e.g., __numpy_ufunc__ in the next release). And AFAICT most of the remaining issues with inheritance simply cannot be fixed, because the requirements are ill-defined and contradictory. -n -- Nathaniel J. Smith Postdoctoral researcher - Informatics - University of Edinburgh http://vorpus.org _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion