Answers for "numpy generate random 2d 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
1

numpy generate random 2d array

import numpy as np
a=np.random.rand(3,3)
print(a)
Posted by: Guest on November-07-2020

Code answers related to "numpy generate random 2d array"

Python Answers by Framework

Browse Popular Code Answers by Language