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)
- برمجة بايثون
- 2021-09-12
- mhanasmh00489829403
الأجوبة
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]
أسئلة مشابهة
القوائم الدراسية التي ينتمي لها السؤال