Python program to create an array using zeros and ones
Python program to create an array
using zeros() and ones()
=======================================
Code:
import numpy
a = zeros(10,int)
print(a)
b = ones(5)
print(b)
Output:
[ 0 0 0 0 0 ]
[1.0 1.0 1.0 1.0 1.0]
No comments:
Post a Comment