Possible PEP - two dimensional arrays?

Paul Rubin no.email at nospam.invalid
Tue Jun 7 20:28:39 EDT 2016


Harrison Chudleigh <harrison.chudleigh1 at education.nsw.gov.au> writes:
> Currently, the closest thing Python has to a 2D array is a dictionary
> containing lists.

Tuples work fine:
  d = {}
  d[2,3] = 5  # etc...

> Is this idea PEPable?

I don't think it would get any traction.  If you're doing something
numerical that needs 2d arrays, numpy supports them.  Actually, looking
at your application, numpy might be what you want.



More information about the Python-list mailing list