Home
last modified time | relevance | path

Searched refs:index_np_1 (Results 1 – 4 of 4) sorted by relevance

/third_party/mindspore/tests/st/pynative/
Dtest_tensor_setitem.py303 index_np_1, index_np_2, index_np_3, index_np_4 = 0, 30, 60, 2.0
306 output_1d_ms_1 = net(input_1d_ms, index_np_1, value_np_1)
307 output_1d_ms_2 = net(input_1d_ms, index_np_1, value_np_2)
308 output_3d_ms_1 = net(input_3d_ms, index_np_1, value_np_1)
309 output_3d_ms_2 = net(output_3d_ms_1, index_np_1, value_np_2)
313 input_1d_np.itemset(index_np_1, value_np_1)
315 input_1d_np.itemset(index_np_1, value_np_2)
317 input_3d_np.itemset(index_np_1, value_np_1)
319 input_3d_np.itemset(index_np_1, value_np_2)
357index_np_1, index_np_2, index_np_3, index_np_4, index_np_5 = (0,), (1, 2), (1, 1, 0), (3, 4, 5), (…
[all …]
Dtest_tensor_getitem.py232 index_np_1 = np.random.randint(4, size=(4, 5)).astype(np.int32)
234 index_1 = Tensor(index_np_1, mstype.int32)
236 assert np.all(out0.asnumpy() == (input_np[index_np_0, index_np_1, 0:3] + const0))
238 assert np.all(out2.asnumpy() == (input_np[0, index_np_0, index_np_1] + const2))
240 assert np.all(out4.asnumpy() == (input_np[0:2, index_np_0, index_np_1] + const4))
241 assert np.all(out5.asnumpy() == (input_np[..., index_np_0, index_np_1] + const5))
288 index_np_1, index_np_2, index_np_3, index_np_4 = 0, 1.0, 30, 60
290 output_1d_ms = net(input_1d_ms, index_np_1)
291 output_3d_ms_1 = net(input_3d_ms, index_np_1)
294 assert np.all(output_1d_ms.asnumpy() == input_1d_np.item(index_np_1))
[all …]
/third_party/mindspore/tests/ut/python/ops/
Dtest_tensor_getitem.py127 index_np_1, index_np_2, index_np_3, index_np_4 = 0, 1.0, 30, 60 variable
133 ('1dTensorItemByInt', {'block': TensorItemByItem(), 'desc_inputs': [input_1d_ms, index_np_1],}),
134 ('3dTensorItemByInt', {'block': TensorItemByItem(), 'desc_inputs': [input_3d_ms, index_np_1],}),
Dtest_tensor_slice.py660 index_np_1, index_np_2, index_np_3, index_np_4 = 0, 30, 60, 2.0 variable
971 'desc_inputs': [input_1d_ms, index_np_1, value_np_1]
975 'desc_inputs': [input_1d_ms, index_np_1, value_np_2]
979 'desc_inputs': [input_3d_ms, index_np_1, value_np_1]
983 'desc_inputs': [input_3d_ms, index_np_1, value_np_2]