After only briefly looking at numpy arrays, I don't understand how they are different than normal Python lists. Can someone explain the difference, and why I would use a numpy array as opposed to a list?
Join them; it only takes a minute:
|
NumPy arrays are specifically designed for working with multidimensional numeric data, with additional support for arrays of arbitrary objects. They provide fast vectorized operations with convenient syntax.
In comparison, lists are fundamentally geared towards 1-dimensional data. You can have a list of lists, but that's not a 2D list. You can't conveniently take the max of a 2D data set represented as a list of lists; calling |
|||||
|
Numpy is an extension, and demands that all the objects on it are of the same type , defined on creation. It also provides a set of linear algebra operations. Its more like a mathematical framework for python to deal with Numeric Calculations (matrix, n stuffs). |
|||
|