consistency: extending arrays vs. multiplication ?

Soeren Sonnenburg Soeren.Sonnenburg at first.fraunhofer.de
Sun Jul 24 10:31:23 EDT 2005


On Sat, 2005-07-23 at 12:15 -0700, Robert Kern wrote:
> Soeren Sonnenburg wrote:
> > Hi all,
> > 
> > Just having started with python, I feel that simple array operations '*'
> > and '+' don't do multiplication/addition but instead extend/join an
> > array:
> > 
> > a=[1,2,3]
> 
> This isn't an array. It is a list. If you want an array, use 
> Numeric/numarray. If you want lists, use lists. Lists will never grow 
> the kind of behavior you're asking for.

Sorry, but I still don't understand the reasons for that. Lists are
infect arrays so why does it make sense to have another *array ? All
that is missing is ufuncs and 'fixing' (as I see it) '+','*' ?

Soeren
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: This is a digitally signed message part
URL: <http://mail.python.org/pipermail/python-list/attachments/20050724/c79f963f/attachment.sig>


More information about the Python-list mailing list