Answers for "how to change the values of a column in numpy array"

1

how to change the values of a column in numpy array

>>> a = np.zeros((2,2), dtype=np.int)
>>> a[:, 0] =  1
>>> a
array([[1, 0],
       [1, 0]])
Posted by: Guest on July-05-2020

Code answers related to "how to change the values of a column in numpy array"

Python Answers by Framework

Browse Popular Code Answers by Language