Write a NumPy program to create an array of 10's with the same shape and type of a given array.Sample array: x = np.arange(4, dtype=np.int64)
import numpy as np x = np.arange(4, dtype=np.int64) y = np.full_like(x, 10) print(y)
Sample Output:
[10 10 10 10]
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
Sample Output:
need an explanation for this answer? contact us directly to get an explanation for this answer