Home
last modified time | relevance | path

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

/third_party/mindspore/mindspore/numpy/
Dutils.py26 def _deep_list(array_like): argument
28 if isinstance(array_like, (list, tuple)):
29 return list(map(_deep_list, array_like))
30 return array_like
33 def _deep_tensor_to_nparray(array_like): argument
47 if isinstance(array_like, Tensor):
48 return array_like.asnumpy()
50 if isinstance(array_like, list):
51 for idx, value in enumerate(array_like):
52 array_like[idx] = _deep_tensor_to_nparray(value)
[all …]
Darray_creations.py791 def _get_shape(array_like): argument
793 if isinstance(array_like, Tensor):
794 return array_like.shape
795 return asarray_const(array_like).shape
798 def _get_dtype(array_like): argument
800 if isinstance(array_like, Tensor):
801 return array_like.dtype
802 return asarray_const(array_like).dtype
/third_party/mindspore/mindspore/ops/composite/multitype_ops/
D_constexpr_utils.py89 def _deep_list(array_like, dim_size=-1): argument
92 array_like = check_range(array_like, dim_size)
93 if isinstance(array_like, (list, tuple)):
94 return list(map(lambda x: _deep_list(x, dim_size), array_like))
95 return array_like
99 def deep_tuple(array_like): argument
101 if isinstance(array_like, (list, tuple)):
102 return tuple(map(deep_tuple, array_like))
103 return array_like
106 def _deep_tensor_to_nparray(array_like): argument
[all …]
/third_party/jerryscript/jerry-core/ecma/builtin-objects/
Decma-builtin-array.c263 ecma_value_t array_like = ecma_op_to_object (items); in ecma_builtin_array_object_from() local
266 if (ECMA_IS_VALUE_ERROR (array_like)) in ecma_builtin_array_object_from()
268 return array_like; in ecma_builtin_array_object_from()
271 ecma_object_t *array_like_obj_p = ecma_get_object_from_value (array_like); in ecma_builtin_array_object_from()