I need to know if it is possible to save a python list as a numPy array.

Login

0 votes

To save a list as a numpy array in Python you can create an array from a sequence.

from numpy import array

a = array( [2,3,4] )

Or

From you can use a sequence of sequences.

from numpy import array

a = array( [[2,3,4], [3,4,5]] )

To know more about this you can have a look at the following video tutorial:-