osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Python-Dev] Replacement for array.array('u')?


Antoine Pitrou wrote:
> TBH, I think anyone trying to use array.array should be directed to
> Numpy these days.  The only reason for array.array being here is that
> it predates Numpy.

Numpy is a huge dependency to pull in when you don't need all the
heavyweight array machinery.

Also, numpy arrays behave very differently from Python sequences
in many ways. For example, they don't have a flexible size, and
you can't concatenate them using +.

Arrays from the array module follow the sequence protocol much
more closely, and that makes them valuable, IMO.

-- 
Greg