Answers for "column of numpy array"

4

print column in 2d numpy array

import numpy as np
x=np.arange(25).reshape(5,5)
print(x)
#print(x[:,index_of_column_you_need])
print(x[:,3])
Posted by: Guest on November-19-2020
0

numpy column

>>> test[:,0]
array([1, 3, 5])
Posted by: Guest on May-16-2021

Code answers related to "column of numpy array"

Python Answers by Framework

Browse Popular Code Answers by Language