[Numpy-discussion] Should I use numpy array?

Robert Kern robert.kern at gmail.com
Wed Jul 25 15:40:17 EDT 2007

Geoffrey Zhu wrote:
> Hi,
> I am writing a function that would take a list of datetime objects and
> a list of single letter characters (such as ["A","B","C"]). The number
> of items tend to be big and both the list and the numpy array have all
> the functionalities I need.
> Do you think I should use numpy arrays or the regular lists?

If lists have all the functionality that you need, then I would probably
recommend sticking with them if the contents are going to be objects rather than
numbers. numpy object arrays can be tricky.

Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
  -- Umberto Eco

More information about the NumPy-Discussion mailing list