Search snippets
Browse Code Answers
FAQ
Usage docs
Log In
Sign Up
Home
Whatever
divide every element in numpy array
anouk
Programming language:
Whatever
2021-06-25 05:53:02
0
Q:
divide every element in numpy array
user1230403
Code:
Whatever
2021-07-25 06:23:21
>>> x = np.arange(5) >>> np.true_divide(x, 4) array([ 0. , 0.25, 0.5 , 0.75, 1. ])
0
Tags
array
element
Related
numpy count the number of 1s in array
Display the square of each element in the array in numpy
print column in 2d numpy array
New to Communities?
Join the community