Search snippets
Browse Code Answers
FAQ
Usage docs
Log In
Sign Up
Home
Python
how to change the values of a column in numpy array
Mehrdad
Programming language:
Python
2021-07-28 14:19:04
0
Q:
how to change the values of a column in numpy array
naykhit
Code:
Python
2021-08-06 19:35:33
>>> a = np.zeros((2,2), dtype=np.int) >>> a[:, 0] = 1 >>> a array([[1, 0], [1, 0]])
0
Tags
array
value
change
how
values
Related
how to get column names having numeric value in pandas
convert dataframe to numpy array
how to union value without the same value in numpy
add a new column to numpy array
numpy apply function to array
vectorize function python numpy
plot function in numpy
How to select parts of a numpy array
python numpy array change axis
numpy move columns
New to Communities?
Join the community