Home
last modified time | relevance | path

Searched refs:astype (Results 1 – 25 of 3926) sorted by relevance

12345678910>>...158

/dports/science/py-nibabel/nibabel-3.2.1/nibabel/cmdline/tests/
H A Dtest_utils.py56 ("dim_info", [np.asarray(0).astype(dtype="uint8"), np.asarray(57).astype(dtype="uint8")]),
59 ("datatype", [np.array(2).astype(dtype="uint8"), np.array(4).astype(dtype="uint8")]),
60 ("bitpix", [np.array(8).astype(dtype="uint8"), np.array(16).astype(dtype="uint8")]),
64 ("slice_end", [np.array(0).astype(dtype="uint8"), np.array(23).astype(dtype="uint8")]),
65 ("xyzt_units", [np.array(0).astype(dtype="uint8"), np.array(10).astype(dtype="uint8")]),
69 ("qform_code", [np.array(0).astype(dtype="int16"), np.array(1).astype(dtype="int16")]),
70 ("sform_code", [np.array(2).astype(dtype="int16"), np.array(1).astype(dtype="int16")]),
94 ("datatype", [np.array(2).astype(dtype="uint8"), np.array(4).astype(dtype="uint8")]),
95 ("bitpix", [np.array(8).astype(dtype="uint8"), np.array(16).astype(dtype="uint8")])
167 ("datatype", [np.array(2).astype(dtype="uint8"), np.array(4).astype(dtype="uint8")]),
[all …]
/dports/misc/py-onnx/onnx-1.10.2/onnx/backend/test/case/node/
H A Dnonmaxsuppression.py31 ]]).astype(np.float32)
34 iou_threshold = np.array([0.5]).astype(np.float32)
54 ]]).astype(np.float32)
57 iou_threshold = np.array([0.5]).astype(np.float32)
77 ]]).astype(np.float32)
100 ]]).astype(np.float32)
118 ]]).astype(np.float32)
119 scores = np.array([[[0.9]]]).astype(np.float32)
146 ]]).astype(np.float32)
170 ]]).astype(np.float32)
[all …]
H A Dsplit.py19 input = np.array([1., 2., 3., 4., 5., 6.]).astype(np.float32)
28 …ted_outputs = [np.array([1., 2.]).astype(np.float32), np.array([3., 4.]).astype(np.float32), np.ar…
31 split = np.array([2, 4]).astype(np.int64)
39 …expected_outputs = [np.array([1., 2.]).astype(np.float32), np.array([3., 4., 5., 6.]).astype(np.fl…
59 split = np.array([2, 4]).astype(np.int64)
83 …ted_outputs = [np.array([1., 2.]).astype(np.float32), np.array([3., 4.]).astype(np.float32), np.ar…
86 split = np.array([2, 4]).astype(np.int64)
93 …expected_outputs = [np.array([1., 2.]).astype(np.float32), np.array([3., 4., 5., 6.]).astype(np.fl…
98 input = np.array([]).astype(np.float32)
101 split = np.array([0, 0, 0]).astype(np.int64)
[all …]
H A Dtfidfvectorizer.py64 ngram_counts = np.array([0, 4]).astype(np.int64)
65 ngram_indexes = np.array([0, 1, 2, 3, 4, 5, 6]).astype(np.int64)
86 ngram_counts = np.array([0, 4]).astype(np.int64)
87 ngram_indexes = np.array([0, 1, 2, 3, 4, 5, 6]).astype(np.int64)
106 output = np.array([1., 1., 1.]).astype(np.float32)
108 ngram_counts = np.array([0, 0]).astype(np.int64)
109 ngram_indexes = np.array([0, 1, 2]).astype(np.int64)
130 ngram_counts = np.array([0, 4]).astype(np.int64)
152 ngram_counts = np.array([0, 4]).astype(np.int64)
174 ngram_counts = np.array([0, 4]).astype(np.int64)
[all …]
H A Dgemm.py36 a = np.random.ranf([3, 5]).astype(np.float32)
37 b = np.random.ranf([5, 4]).astype(np.float32)
38 c = np.zeros([1, 4]).astype(np.float32)
50 a = np.random.ranf([2, 10]).astype(np.float32)
63 a = np.random.ranf([2, 3]).astype(np.float32)
64 b = np.random.ranf([3, 4]).astype(np.float32)
65 c = np.array(3.14).astype(np.float32)
79 c = np.random.ranf([1]).astype(np.float32)
122 c = np.zeros([1, 4]).astype(np.float32)
137 c = np.zeros([1, 4]).astype(np.float32)
[all …]
H A Dpow.py16 z = np.power(x, y).astype(x.dtype)
30 x = np.array([1, 2, 3]).astype(np.float32)
31 y = np.array([4, 5, 6]).astype(np.float32)
50 x = np.array([1, 2, 3]).astype(np.float32)
51 y = np.array(2).astype(np.float32)
77 y = np.array([4, 5, 6]).astype(np.int64)
82 x = np.array([1, 2, 3]).astype(np.int64)
89 y = np.array([4, 5, 6]).astype(np.int32)
94 x = np.array([1, 2, 3]).astype(np.int32)
112 x = np.array([1, 2, 3]).astype(np.int64)
[all …]
H A Dconvtranspose.py21 [6., 7., 8.]]]]).astype(np.float32)
28 [1., 1., 1.]]]]).astype(np.float32)
51 [1., 1., 1.]]]).astype(np.float32)
92 [1., 1., 1.]]]]]).astype(np.float32)
172 [6., 7., 8.]]]]).astype(np.float32)
179 [1., 1., 1.]]]]).astype(np.float32)
228 [6., 7., 8.]]]]).astype(np.float32)
235 [1., 1., 1.]]]]).astype(np.float32)
263 [3., 2., 6.]]]]).astype(np.float32)
265 [1., 9.]]]]).astype(np.float32)
[all …]
H A Dbatchnorm.py40 s = np.random.randn(3).astype(np.float32)
41 bias = np.random.randn(3).astype(np.float32)
42 mean = np.random.randn(3).astype(np.float32)
43 var = np.random.rand(3).astype(np.float32)
58 s = np.random.randn(3).astype(np.float32)
59 bias = np.random.randn(3).astype(np.float32)
61 var = np.random.rand(3).astype(np.float32)
80 s = np.random.randn(3).astype(np.float32)
83 var = np.random.rand(3).astype(np.float32)
103 s = np.random.randn(3).astype(np.float32)
[all …]
H A Dmod.py70 x = np.array([-4, 7, 5, 4, -7, 8]).astype(np.int64)
71 y = np.array([2, -3, 8, -2, 3, 5]).astype(np.int64)
126 x = np.array([4, 7, 5]).astype(np.uint8)
127 y = np.array([2, 3, 8]).astype(np.uint8)
140 x = np.array([4, 7, 5]).astype(np.uint16)
141 y = np.array([2, 3, 8]).astype(np.uint16)
154 x = np.array([4, 7, 5]).astype(np.uint32)
155 y = np.array([2, 3, 8]).astype(np.uint32)
168 x = np.array([4, 7, 5]).astype(np.uint64)
169 y = np.array([2, 3, 8]).astype(np.uint64)
[all …]
H A Dtrilu.py55 k = np.array(-1).astype(np.int64)
78 k = np.array(-7).astype(np.int64)
101 k = np.array(2).astype(np.int64)
124 k = np.array(6).astype(np.int64)
175 k = np.array(-1).astype(np.int64)
204 k = np.array(1).astype(np.int64)
229 k = np.array(6).astype(np.int64)
270 k = np.array(-1).astype(np.int64)
318 k = np.array(2).astype(np.int64)
341 k = np.array(6).astype(np.int64)
[all …]
H A Dsoftmaxcrossentropy.py107 x = np.random.rand(3, 5).astype(np.float32)
129 x = np.random.rand(3, 5).astype(np.float32)
151 x = np.random.rand(3, 5).astype(np.float32)
174 x = np.random.rand(3, 5).astype(np.float32)
197 x = np.random.rand(3, 5).astype(np.float32)
219 x = np.random.rand(3, 5).astype(np.float32)
241 x = np.random.rand(3, 5).astype(np.float32)
263 x = np.random.rand(3, 5).astype(np.float32)
329 x = np.random.rand(3, 5).astype(np.float32)
352 x = np.random.rand(3, 5).astype(np.float32)
[all …]
H A Dand.py26 x = (np.random.randn(3, 4) > 0).astype(np.bool)
27 y = (np.random.randn(3, 4) > 0).astype(np.bool)
33 x = (np.random.randn(3, 4, 5) > 0).astype(np.bool)
34 y = (np.random.randn(3, 4, 5) > 0).astype(np.bool)
40 x = (np.random.randn(3, 4, 5, 6) > 0).astype(np.bool)
55 x = (np.random.randn(3, 4, 5) > 0).astype(np.bool)
56 y = (np.random.randn(5) > 0).astype(np.bool)
62 x = (np.random.randn(3, 4, 5) > 0).astype(np.bool)
63 y = (np.random.randn(4, 5) > 0).astype(np.bool)
70 y = (np.random.randn(5, 6) > 0).astype(np.bool)
[all …]
H A Dor.py26 x = (np.random.randn(3, 4) > 0).astype(np.bool)
27 y = (np.random.randn(3, 4) > 0).astype(np.bool)
33 x = (np.random.randn(3, 4, 5) > 0).astype(np.bool)
34 y = (np.random.randn(3, 4, 5) > 0).astype(np.bool)
40 x = (np.random.randn(3, 4, 5, 6) > 0).astype(np.bool)
55 x = (np.random.randn(3, 4, 5) > 0).astype(np.bool)
56 y = (np.random.randn(5) > 0).astype(np.bool)
62 x = (np.random.randn(3, 4, 5) > 0).astype(np.bool)
63 y = (np.random.randn(4, 5) > 0).astype(np.bool)
70 y = (np.random.randn(5, 6) > 0).astype(np.bool)
[all …]
H A Dxor.py26 x = (np.random.randn(3, 4) > 0).astype(np.bool)
27 y = (np.random.randn(3, 4) > 0).astype(np.bool)
33 x = (np.random.randn(3, 4, 5) > 0).astype(np.bool)
34 y = (np.random.randn(3, 4, 5) > 0).astype(np.bool)
40 x = (np.random.randn(3, 4, 5, 6) > 0).astype(np.bool)
55 x = (np.random.randn(3, 4, 5) > 0).astype(np.bool)
56 y = (np.random.randn(5) > 0).astype(np.bool)
62 x = (np.random.randn(3, 4, 5) > 0).astype(np.bool)
63 y = (np.random.randn(4, 5) > 0).astype(np.bool)
70 y = (np.random.randn(5, 6) > 0).astype(np.bool)
[all …]
/dports/misc/glow/glow-f24d960e3cc80db95ac0bc17b1900dbf60ca044a/thirdparty/onnx/onnx/backend/test/case/node/
H A Dnonmaxsuppression.py29 ]]).astype(np.float32)
32 iou_threshold = np.array([0.5]).astype(np.float32)
52 ]]).astype(np.float32)
55 iou_threshold = np.array([0.5]).astype(np.float32)
75 ]]).astype(np.float32)
98 ]]).astype(np.float32)
116 ]]).astype(np.float32)
117 scores = np.array([[[0.9]]]).astype(np.float32)
144 ]]).astype(np.float32)
168 ]]).astype(np.float32)
[all …]
H A Dtfidfvectorizer.py62 ngram_counts = np.array([0, 4]).astype(np.int64)
63 ngram_indexes = np.array([0, 1, 2, 3, 4, 5, 6]).astype(np.int64)
84 ngram_counts = np.array([0, 4]).astype(np.int64)
85 ngram_indexes = np.array([0, 1, 2, 3, 4, 5, 6]).astype(np.int64)
104 output = np.array([1., 1., 1.]).astype(np.float32)
106 ngram_counts = np.array([0, 0]).astype(np.int64)
107 ngram_indexes = np.array([0, 1, 2]).astype(np.int64)
128 ngram_counts = np.array([0, 4]).astype(np.int64)
150 ngram_counts = np.array([0, 4]).astype(np.int64)
172 ngram_counts = np.array([0, 4]).astype(np.int64)
[all …]
H A Dsplit.py17 input = np.array([1., 2., 3., 4., 5., 6.]).astype(np.float32)
26 …ted_outputs = [np.array([1., 2.]).astype(np.float32), np.array([3., 4.]).astype(np.float32), np.ar…
37 …expected_outputs = [np.array([1., 2.]).astype(np.float32), np.array([3., 4., 5., 6.]).astype(np.fl…
43 [7., 8., 9., 10., 11., 12.]]).astype(np.float32)
52 expected_outputs = [np.array([[1., 2., 3.], [7., 8., 9.]]).astype(np.float32),
53 np.array([[4., 5., 6.], [10., 11., 12.]]).astype(np.float32)]
65 expected_outputs = [np.array([[1., 2.], [7., 8.]]).astype(np.float32),
66 np.array([[3., 4., 5., 6.], [9., 10., 11., 12.]]).astype(np.float32)]
72 input = np.array([1., 2., 3., 4., 5., 6.]).astype(np.float32)
81 …ted_outputs = [np.array([1., 2.]).astype(np.float32), np.array([3., 4.]).astype(np.float32), np.ar…
[all …]
H A Dconvtranspose.py19 [6., 7., 8.]]]]).astype(np.float32)
26 [1., 1., 1.]]]]).astype(np.float32)
49 [1., 1., 1.]]]).astype(np.float32)
54 [0., 1., 3., 3., 2.]]]).astype(np.float32)
90 [1., 1., 1.]]]]]).astype(np.float32)
170 [6., 7., 8.]]]]).astype(np.float32)
177 [1., 1., 1.]]]]).astype(np.float32)
226 [6., 7., 8.]]]]).astype(np.float32)
233 [1., 1., 1.]]]]).astype(np.float32)
261 [3., 2., 6.]]]]).astype(np.float32)
[all …]
H A Dmod.py68 x = np.array([-4, 7, 5, 4, -7, 8]).astype(np.int64)
69 y = np.array([2, -3, 8, -2, 3, 5]).astype(np.int64)
110 x = np.array([-4, 7, 5, 4, -7, 8]).astype(np.int8)
124 x = np.array([4, 7, 5]).astype(np.uint8)
125 y = np.array([2, 3, 8]).astype(np.uint8)
138 x = np.array([4, 7, 5]).astype(np.uint16)
139 y = np.array([2, 3, 8]).astype(np.uint16)
152 x = np.array([4, 7, 5]).astype(np.uint32)
153 y = np.array([2, 3, 8]).astype(np.uint32)
166 x = np.array([4, 7, 5]).astype(np.uint64)
[all …]
/dports/math/py-pandas/pandas-1.2.5/pandas/tests/frame/methods/
H A Dtest_astype.py137 df.astype(dtype)
215 tm.assert_frame_equal(df.astype(dt3), df.astype(str))
224 df.astype(dt4)
226 df.astype(dt5)
304 tm.assert_frame_equal(df.astype("int64").astype(dtype), expected1)
305 tm.assert_frame_equal(df.astype(dtype).astype("float64"), df)
315 tm.assert_frame_equal(df.astype("int64").astype(dtype), expected1)
324 tm.assert_frame_equal(df.astype("int64").astype(dtype), expected1)
332 tm.assert_frame_equal(df.astype("int64").astype(dtype), expected1)
342 expected = concat([a1.astype(dtype), a2.astype(dtype)], axis=1)
[all …]
/dports/math/py-pandas/pandas-1.2.5/pandas/tests/series/
H A Dtest_dtypes.py21 res = s.astype("category")
27 res = s.astype("category")
65 ser.astype("float64")
80 cmp(ser.astype("object"), expected)
92 result = ser.astype("object").astype("category")
94 result = ser.astype("object").astype(CategoricalDtype())
108 ser.astype(Categorical)
110 ser.astype("object").astype(Categorical)
116 df.col1 = df.col1.astype("category")
138 s1 = s.reindex(new_index).astype(temp_dtype).astype(new_dtype)
[all …]
/dports/math/py-pandas/pandas-1.2.5/pandas/tests/series/methods/
H A Dtest_astype.py62 ser.astype(dt3)
66 ser.astype(dt4)
76 ser.astype(dt5)
137 s.astype(dtype)
163 s = s.astype("O")
168 s = s.astype("O")
176 s = s.astype("O")
209 s = ts.astype(str)
215 s = ts.astype(str)
301 s.astype(dtype)
[all …]
/dports/math/py-pandas/pandas-1.2.5/pandas/tests/indexes/interval/
H A Dtest_astype.py67 index.astype(dtype)
94 index.left.astype(subtype), index.right.astype(subtype), closed=index.closed
124 index.astype(dtype)
147 index.left.astype(subtype), index.right.astype(subtype), closed=index.closed
162 index.astype(dtype)
168 index.astype(dtype)
172 index.astype(dtype)
179 index.astype(dtype)
202 index.left.astype(subtype), index.right.astype(subtype), closed=index.closed
210 index.astype(dtype)
[all …]
/dports/math/py-theano/Theano-1.0.5/theano/gpuarray/tests/
H A Dtest_blas.py31 rand(3, 2).astype('float32'),
34 rand(3, 2).astype('float64'),
46 float16_data = [rand(3).astype('float16'),
48 rand(3, 3).astype('float16'),
49 rand(3).astype('float16'),
62 float16_data = [rand(3, 3).astype('float16'),
64 rand(3, 3).astype('float16'),
65 rand(3, 3).astype('float16'),
76 float16_data = [rand(3, 3).astype('float16'),
77 rand(3, 3).astype('float16')]
[all …]
/dports/math/py-pandas/pandas-1.2.5/pandas/tests/indexes/
H A Dtest_datetimelike.py31 assert index.equals(index.astype(object))
61 assert idx.equals(idx.astype(object))
62 assert idx.astype(object).equals(idx)
63 assert idx.astype(object).equals(idx.astype(object))
98 assert idx.equals(idx.astype(object))
99 assert idx.astype(object).equals(idx)
100 assert idx.astype(object).equals(idx.astype(object))
150 assert idx.equals(idx.astype(object))
151 assert idx.astype(object).equals(idx)
152 assert idx.astype(object).equals(idx.astype(object))
[all …]

12345678910>>...158