0 votes
1 view
in Python by (47.8k points)

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

1 Answer

0 votes
by (107k points)

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:-

Related questions

0 votes
1 answer
asked Oct 3, 2019 in Python by Sammy (47.8k points)
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...