blob: 36efa76f75f231391cb4ef92f50cdd7b942dc8aa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
try:
from ulab import numpy as np
except:
import numpy as np
dtypes = (np.uint8, np.int8, np.uint16, np.int16, np.float)
n = 5
a = np.array(range(n), dtype=np.complex)
c = np.array(range(n), dtype=np.complex)
print(a == c)
print(a != c)
print()
c = np.array(range(n), dtype=np.complex) * 1j
print(a == c)
print(a != c)
print()
for dtype in dtypes:
b = np.array(range(n), dtype=dtype)
print(b == a)
print(b != a)
print()
|