On Thu, Jan 09, 2003 at 08:42:58AM -0800, Stefano Mazzocchi wrote:
> David N. Welton wrote:
>...
> > Anyone can code in Python. It's easy, and it runs anywhere. Not
> > quite an offer of help, but... if you have figured out one programming
> > language, picking up Python will not be hard, nor unpleasant.
>
> That's been my experience... but python really needs better support for
> multidimensional arrays :-) or merge numeric python in the default
> language. But anyway...
Huh?
>>> array = [ [1, 2, 3],
... [4, 5, 6],
... [7, 8, 9] ]
>>> print array[1][2]
6
>>> sparse = { (1,2): 6, (2,1): 8 }
>>> sparse[1,2]
6
>>>
The Numeric package is for high-performance numeric computation. Most users
don't need that kind of heavy-lifting. There are also some semantic oddities
in the package that need to be ironed about before it could move into the
core Python distribution.
But out of the box? Python has multidimensional arrays. Not sure what you're
smoking :-)
(and don't ask me about the time I tried to do a hash of hashes of hashes in
Perl... even with Perl hacker help, I gave up; Perl just wouldn't do it)
Cheers,
-g
--
Greg Stein, http://www.lyra.org/