|
11 | 11 |
|
12 | 12 | class SubClass(np.ndarray): ... |
13 | 13 |
|
14 | | -i8 = np.int64(1) |
15 | | -A = np.array([[1]], dtype=np.int64) |
16 | | -B0 = np.empty((), dtype=np.int64).view(SubClass) |
17 | | -B1 = np.empty((1,), dtype=np.int64).view(SubClass) |
18 | | -B2 = np.empty((1, 1), dtype=np.int64).view(SubClass) |
19 | | -C = np.array([0, 1, 2], dtype=np.int64) |
| 14 | +i4 = np.int32(1) |
| 15 | +A = np.array([[1]], dtype=np.int32) |
| 16 | +B0 = np.empty((), dtype=np.int32).view(SubClass) |
| 17 | +B1 = np.empty((1,), dtype=np.int32).view(SubClass) |
| 18 | +B2 = np.empty((1, 1), dtype=np.int32).view(SubClass) |
| 19 | +C = np.array([0, 1, 2], dtype=np.int32) |
20 | 20 | D = np.empty(3).view(SubClass) |
21 | 21 |
|
22 | | -i8.all() |
| 22 | +i4.all() |
23 | 23 | A.all() |
24 | 24 | A.all(axis=0) |
25 | 25 | A.all(keepdims=True) |
26 | 26 | A.all(out=B0) |
27 | 27 |
|
28 | | -i8.any() |
| 28 | +i4.any() |
29 | 29 | A.any() |
30 | 30 | A.any(axis=0) |
31 | 31 | A.any(keepdims=True) |
32 | 32 | A.any(out=B0) |
33 | 33 |
|
34 | | -i8.argmax() |
| 34 | +i4.argmax() |
35 | 35 | A.argmax() |
36 | 36 | A.argmax(axis=0) |
37 | 37 | A.argmax(out=B0) |
38 | 38 |
|
39 | | -i8.argmin() |
| 39 | +i4.argmin() |
40 | 40 | A.argmin() |
41 | 41 | A.argmin(axis=0) |
42 | 42 | A.argmin(out=B0) |
43 | 43 |
|
44 | | -i8.argsort() |
| 44 | +i4.argsort() |
45 | 45 | A.argsort() |
46 | 46 |
|
47 | | -i8.choose([()]) |
48 | | -_choices = np.array([[0, 1, 2], [3, 4, 5], [6, 7, 8]], dtype=np.int64) |
| 47 | +i4.choose([()]) |
| 48 | +_choices = np.array([[0, 1, 2], [3, 4, 5], [6, 7, 8]], dtype=np.int32) |
49 | 49 | C.choose(_choices) |
50 | 50 | C.choose(_choices, out=D) |
51 | 51 |
|
52 | | -i8.clip(1) |
| 52 | +i4.clip(1) |
53 | 53 | A.clip(1) |
54 | 54 | A.clip(None, 1) |
55 | 55 | A.clip(1, out=B2) |
56 | 56 | A.clip(None, 1, out=B2) |
57 | 57 |
|
58 | | -i8.compress([1]) |
| 58 | +i4.compress([1]) |
59 | 59 | A.compress([1]) |
60 | 60 | A.compress([1], out=B1) |
61 | 61 |
|
62 | | -i8.conj() |
| 62 | +i4.conj() |
63 | 63 | A.conj() |
64 | 64 | B0.conj() |
65 | 65 |
|
66 | | -i8.conjugate() |
| 66 | +i4.conjugate() |
67 | 67 | A.conjugate() |
68 | 68 | B0.conjugate() |
69 | 69 |
|
70 | | -i8.cumprod() |
| 70 | +i4.cumprod() |
71 | 71 | A.cumprod() |
72 | 72 | A.cumprod(out=B1) |
73 | 73 |
|
74 | | -i8.cumsum() |
| 74 | +i4.cumsum() |
75 | 75 | A.cumsum() |
76 | 76 | A.cumsum(out=B1) |
77 | 77 |
|
78 | | -i8.max() |
| 78 | +i4.max() |
79 | 79 | A.max() |
80 | 80 | A.max(axis=0) |
81 | 81 | A.max(keepdims=True) |
82 | 82 | A.max(out=B0) |
83 | 83 |
|
84 | | -i8.mean() |
| 84 | +i4.mean() |
85 | 85 | A.mean() |
86 | 86 | A.mean(axis=0) |
87 | 87 | A.mean(keepdims=True) |
88 | 88 | A.mean(out=B0) |
89 | 89 |
|
90 | | -i8.min() |
| 90 | +i4.min() |
91 | 91 | A.min() |
92 | 92 | A.min(axis=0) |
93 | 93 | A.min(keepdims=True) |
94 | 94 | A.min(out=B0) |
95 | 95 |
|
96 | | -i8.newbyteorder() |
| 96 | +i4.newbyteorder() |
97 | 97 | A.newbyteorder() |
98 | 98 | B0.newbyteorder('|') |
99 | 99 |
|
100 | | -i8.prod() |
| 100 | +i4.prod() |
101 | 101 | A.prod() |
102 | 102 | A.prod(axis=0) |
103 | 103 | A.prod(keepdims=True) |
104 | 104 | A.prod(out=B0) |
105 | 105 |
|
106 | | -i8.ptp() |
| 106 | +i4.ptp() |
107 | 107 | A.ptp() |
108 | 108 | A.ptp(axis=0) |
109 | 109 | A.ptp(keepdims=True) |
110 | 110 | A.astype(int).ptp(out=B0) |
111 | 111 |
|
112 | | -i8.round() |
| 112 | +i4.round() |
113 | 113 | A.round() |
114 | 114 | A.round(out=B2) |
115 | 115 |
|
116 | | -i8.repeat(1) |
| 116 | +i4.repeat(1) |
117 | 117 | A.repeat(1) |
118 | 118 | B0.repeat(1) |
119 | 119 |
|
120 | | -i8.std() |
| 120 | +i4.std() |
121 | 121 | A.std() |
122 | 122 | A.std(axis=0) |
123 | 123 | A.std(keepdims=True) |
124 | 124 | A.std(out=B0.astype(np.float64)) |
125 | 125 |
|
126 | | -i8.sum() |
| 126 | +i4.sum() |
127 | 127 | A.sum() |
128 | 128 | A.sum(axis=0) |
129 | 129 | A.sum(keepdims=True) |
130 | 130 | A.sum(out=B0) |
131 | 131 |
|
132 | | -i8.take(0) |
| 132 | +i4.take(0) |
133 | 133 | A.take(0) |
134 | 134 | A.take([0]) |
135 | 135 | A.take(0, out=B0) |
136 | 136 | A.take([0], out=B1) |
137 | 137 |
|
138 | | -i8.var() |
| 138 | +i4.var() |
139 | 139 | A.var() |
140 | 140 | A.var(axis=0) |
141 | 141 | A.var(keepdims=True) |
|
0 commit comments