arrays

John Hunter jdhunter at ace.bsd.uchicago.edu
Mon Nov 15 13:48:21 EST 2004


>>>>> "Rahul" == Rahul Garg <codedivine at gmail.com> writes:

    Rahul> Hi.  Is there someway i can get something similar to
    Rahul> multi-dimensional arrays in python.I dont want to use
    Rahul> Numarray

Yes, you can use lists of lists for example.  

  x = [ [None for i in range(10)] for j in range (12)]
  x[1][2] = 1

But it would help if you stated what your requirements are for the
multi-dim array, what kind of objects you want to store in them, what
kind of operations you need to be able to do, what your performance
requirements are, and why you don't want to use numarray or Numeric
for that matter.


JDH




More information about the Python-list mailing list