[Numpy-discussion] Re: [Python-Dev] Re: Numeric life as I see it

konrad.hinsen at laposte.net konrad.hinsen at laposte.net
Thu Feb 10 09:38:40 CET 2005

On 10.02.2005, at 05:36, Guido van Rossum wrote:

> And why would a Matrix need to inherit from a C-array? Wouldn't it
> make more sense from an OO POV for the Matrix to *have* a C-array
> without *being* one?

Definitely. Most array operations make no sense on matrices. And  
matrices are limited to two dimensions. Making Matrix a subclass of  
Array would be inheritance for implementation while removing 90% of the  

On the other hand, a Matrix object is perfectly defined by its  
behaviour and independent of its implementation. One could perfectly  
well implement one using Python lists or dictionaries, even though that  
would be pointless from a performance point of view.

Konrad Hinsen
Laboratoire Leon Brillouin, CEA Saclay,
91191 Gif-sur-Yvette Cedex, France
Tel.: +33-1 69 08 79 25
Fax: +33-1 69 08 82 61
E-Mail: khinsen at cea.fr

More information about the Python-Dev mailing list