We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Python
- Numpy
- Zeros and Ones
- Discussions
Zeros and Ones
Zeros and Ones
Sort by
recency
|
306 Discussions
|
Please Login in order to post a comment
For Python3
I Code this but it dosen't approved my solve why? y = np.zeros(([3,3,3]),dtype=np.int32) print(y) x = np.ones(([3,3,3]),dtype=np.int32) print(x)
dtype = depending on the version used
import numpy shape = tuple(map(int, input().strip().split())) print(numpy.zeros(shape, dtype=numpy.int_)) print(numpy.ones(shape, dtype=numpy.int_))