aboutsummaryrefslogtreecommitdiff
path: root/circuitpython/extmod/ulab/tests/2d/numpy/ones.py
blob: f0aee8682d2cb7a3f8130e70a6c5b1e07bc71116 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
try:
    from ulab import numpy as np
except:
    import numpy as np

dtypes = (np.uint8, np.int8, np.uint16, np.int16, np.float)

print(np.ones(3))
print(np.ones((3,3)))

for dtype in dtypes:
    print(np.ones((3,3), dtype=dtype))
    print(np.ones((4,2), dtype=dtype))