On Mon, Oct 29, 2018 at 4:31 PM Chris Barker <chris.bar...@noaa.gov> wrote:
> On Fri, Oct 26, 2018 at 7:12 PM, Travis Oliphant <teoliph...@gmail.com> > wrote: > > >> 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? > The latter - changing the behavior of multiplication breaks the principle. Ralf
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/listinfo/numpy-discussion