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
|
322 Discussions
|
Please Login in order to post a comment
just FYI, numpy.int no longer works, it has be to int for dtype
import numpy as np n = tuple(map(int, input().split()))
print(np.zeros(n).astype(int)) print(np.ones(n).astype(int))