[Numpy-discussion] asanyarray vs. asarray

Chris Barker chris.barker at noaa.gov
Mon Oct 29 19:30:44 EDT 2018

On Fri, Oct 26, 2018 at 7:12 PM, Travis Oliphant <teoliphant at gmail.com>

>  agree that we can stop bashing subclasses in general.   The problem with
> numpy subclasses is that they were made without adherence to SOLID:
> https://en.wikipedia.org/wiki/SOLID.  In particular the Liskov
> substitution principle:  https://en.wikipedia.org/wiki/
> Liskov_substitution_principle .


> did not properly apply them in creating np.matrix which clearly violates
> the substitution principle.

So -- could a matrix subclass be made "properly"? or is that an example of
something that should not have been a subclass?



Christopher Barker, Ph.D.

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20181029/9f09d9cf/attachment.html>

More information about the NumPy-Discussion mailing list