/external/python/cpython3/Lib/test/ |
D | test_buffer.py | 27 ndarray = None variable 42 from numpy import ndarray as numpy_array 620 return ndarray(items, shape=shape, strides=strides, format=fmt, 730 if isinstance(nd, ndarray): 757 @unittest.skipUnless(ndarray, 'ndarray object required for this test') 810 if isinstance(result, ndarray) or is_memoryview_format(fmt): 865 expected = ndarray(trans, shape=shape, format=ff, 871 expected = ndarray(flattened, shape=shape, format=ff) 894 y = ndarray(initlst, shape=shape, flags=ro, format=fmt) 905 y = ndarray(initlst, shape=shape, flags=ro|ND_FORTRAN, [all …]
|
/external/tensorflow/tensorflow/compiler/xla/python_api/ |
D | xla_literal.py | 57 ndarray = _np.array( 61 return numpy_reshaper(ndarray) 64 def _ConvertNumpyArrayToLiteral(ndarray): argument 66 type_record = types.MAP_DTYPE_TO_RECORD[str(ndarray.dtype)] 68 literal.shape.CopyFrom(xla_shape.CreateShapeFromNumpy(ndarray).message) 70 if ndarray.ndim == 0: 72 ndarray.astype(type_record.literal_field_type).item()) 75 if ndarray.dtype in {_np.bool_, _np.dtype('bool')}: 76 for element in _np.nditer(ndarray): 80 ndarray_flat = ndarray.ravel(order='A')
|
D | xla_shape.py | 103 def _CreateShapeFromNumpy(ndarray): # pylint: disable=invalid-name argument 112 element_type = types.MAP_DTYPE_TO_RECORD[str(ndarray.dtype)].primitive_type 113 dimensions = ndarray.shape 117 if _np.isfortran(ndarray): 120 layout = range(ndarray.ndim) 124 layout = list(reversed(xrange(ndarray.ndim)))
|
/external/tensorflow/tensorflow/python/framework/ |
D | fast_tensor_util.pyx | 10 tensor_proto, np.ndarray[np.uint16_t, ndim=1] nparray): 22 tensor_proto, np.ndarray[np.uint16_t, ndim=1] nparray): 30 tensor_proto, np.ndarray[np.float32_t, ndim=1] nparray): 38 tensor_proto, np.ndarray[np.float64_t, ndim=1] nparray): 46 tensor_proto, np.ndarray[np.int32_t, ndim=1] nparray): 53 tensor_proto, np.ndarray[np.uint32_t, ndim=1] nparray): 60 tensor_proto, np.ndarray[np.int64_t, ndim=1] nparray): 67 tensor_proto, np.ndarray[np.uint64_t, ndim=1] nparray): 74 tensor_proto, np.ndarray[np.uint8_t, ndim=1] nparray): 82 tensor_proto, np.ndarray[np.uint16_t, ndim=1] nparray): [all …]
|
D | tensor_spec_test.py | 163 self.assertEqual(type(spec.minimum), np.ndarray) 164 self.assertEqual(type(spec.maximum), np.ndarray) 187 self.assertIsInstance(spec.minimum, np.ndarray) 188 self.assertIsInstance(spec.maximum, np.ndarray)
|
/external/toolchain-utils/cros_utils/ |
D | stats.py | 2255 assert type(limits) in [ListType, TupleType, N.ndarray 2292 assert type(limits) in [ListType, TupleType, N.ndarray 2384 assert type(limits) in [ListType, TupleType, N.ndarray 2456 if type(denom) == N.ndarray and asum(zero) <> 0: 2474 if type(denom) == N.ndarray and asum(zero) <> 0: 3340 if type(a) != N.ndarray: 3395 if type(t) == N.ndarray: 3401 if type(t) == N.ndarray: 3403 if type(probs) == N.ndarray: 3485 if type(t) == N.ndarray: [all …]
|
D | pstat.py | 772 if type(indices) not in [ListType, TupleType, N.ndarray]: 798 if type(keepcols) not in [ListType, TupleType, N.ndarray]: 800 if type(collapsecols) not in [ListType, TupleType, N.ndarray]: 822 if type(keepcols) not in [ListType, TupleType, N.ndarray]: 829 if type(item) not in [ListType, TupleType, N.ndarray]: 883 if type(columnlist) not in [ListType, TupleType, N.ndarray]: 885 if type(valuelist) not in [ListType, TupleType, N.ndarray]: 909 if type(columnlist) not in [ListType, TupleType, N.ndarray]: 911 if type(valuelist) not in [ListType, TupleType, N.ndarray]:
|
/external/tensorflow/tensorflow/python/ops/ragged/ |
D | ragged_test_util.py | 40 return a.tolist() if isinstance(a, np.ndarray) else a 41 elif isinstance(a, np.ndarray): 85 elif isinstance(value, np.ndarray):
|
D | ragged_tensor_value.py | 43 if not (isinstance(row_splits, (np.ndarray, np.generic)) and 46 if not isinstance(values, (np.ndarray, np.generic, RaggedTensorValue)):
|
/external/tensorflow/tensorflow/lite/java/src/main/native/ |
D | tensor_jni.cc | 190 jobjectArray ndarray = static_cast<jobjectArray>(dst); in ReadMultiDimensionalArray() local 191 int len = env->GetArrayLength(ndarray); in ReadMultiDimensionalArray() 194 jarray row = static_cast<jarray>(env->GetObjectArrayElement(ndarray, i)); in ReadMultiDimensionalArray() 242 jobjectArray ndarray = static_cast<jobjectArray>(src); in WriteMultiDimensionalArray() local 243 int len = env->GetArrayLength(ndarray); in WriteMultiDimensionalArray() 246 jobject row = env->GetObjectArrayElement(ndarray, i); in WriteMultiDimensionalArray()
|
/external/tensorflow/tensorflow/compiler/tests/ |
D | dynamic_stitch_test.py | 64 val1 = np.ndarray(shape=(0, 9), dtype=np.int32) 65 val2 = np.ndarray(shape=(2, 0, 9), dtype=np.int32) 67 expected=np.ndarray(
|
/external/tensorflow/tensorflow/python/kernel_tests/ |
D | tensor_priority_test.py | 30 class NumpyArraySubclass(np.ndarray): 68 class NumpyArraySubclass(np.ndarray):
|
/external/tensorflow/tensorflow/contrib/slim/python/slim/data/ |
D | test_utils.py | 33 def _encoded_int64_feature(ndarray): argument 35 value=ndarray.flatten().tolist()))
|
D | tfexample_decoder_test.py | 39 def _EncodedFloatFeature(self, ndarray): argument 41 float_list=feature_pb2.FloatList(value=ndarray.flatten().tolist())) 43 def _EncodedInt64Feature(self, ndarray): argument 45 int64_list=feature_pb2.Int64List(value=ndarray.flatten().tolist())) 56 def _BytesFeature(self, ndarray): argument 57 values = ndarray.flatten().tolist()
|
/external/tensorflow/tensorflow/java/src/main/native/ |
D | tensor_jni.cc | 190 jobjectArray ndarray = static_cast<jobjectArray>(src); in writeNDArray() local 191 int len = env->GetArrayLength(ndarray); in writeNDArray() 194 jarray row = static_cast<jarray>(env->GetObjectArrayElement(ndarray, i)); in writeNDArray() 209 jobjectArray ndarray = static_cast<jobjectArray>(dst); in readNDArray() local 210 int len = env->GetArrayLength(ndarray); in readNDArray() 213 jarray row = static_cast<jarray>(env->GetObjectArrayElement(ndarray, i)); in readNDArray()
|
/external/tensorflow/tensorflow/python/lib/core/ |
D | ndarray_tensor.h | 37 Status PyArrayToTF_Tensor(PyObject* ndarray, Safe_TF_TensorPtr* out_tensor);
|
/external/tensorflow/tensorflow/python/kernel_tests/distributions/ |
D | util_test.py | 488 if not isinstance(x, np.ndarray): 549 self.assertIsInstance(rank, np.ndarray) 556 self.assertIsInstance(rank, np.ndarray) 563 self.assertIsInstance(rank, np.ndarray) 594 self.assertIsInstance(shape, np.ndarray) 601 self.assertIsInstance(shape, np.ndarray) 608 self.assertIsInstance(shape, np.ndarray) 639 self.assertIsInstance(value, np.ndarray) 646 self.assertIsInstance(value, np.ndarray) 653 self.assertIsInstance(value, np.ndarray)
|
/external/tensorflow/tensorflow/python/util/ |
D | serialization.py | 47 if isinstance(obj, np.ndarray):
|
/external/tensorflow/tensorflow/python/keras/engine/ |
D | training_distributed.py | 65 if isinstance(first_x_value, np.ndarray): 91 if isinstance(first_valx_value, np.ndarray): 146 if isinstance(first_x_value, np.ndarray): 178 if isinstance(first_x_value, np.ndarray):
|
/external/tensorflow/tensorflow/contrib/checkpoint/python/ |
D | python_state.py | 103 if isinstance(value, (numpy.ndarray, numpy.generic)):
|
/external/tensorflow/tensorflow/examples/tutorials/word2vec/ |
D | word2vec_basic.py | 115 batch = np.ndarray(shape=(batch_size), dtype=np.int32) 116 labels = np.ndarray(shape=(batch_size, 1), dtype=np.int32)
|
/external/tensorflow/tensorflow/python/keras/utils/ |
D | io_utils.py | 100 elif isinstance(key, np.ndarray):
|
/external/tensorflow/tensorflow/contrib/distributions/python/ops/ |
D | batch_reshape.py | 334 if (isinstance(expected_batch_event_shape, np.ndarray) and 335 isinstance(actual_batch_event_shape, np.ndarray)):
|
/external/tensorflow/tensorflow/compiler/xla/experimental/xla_sharding/ |
D | xla_sharding.py | 81 if not isinstance(tile_assignment, _np.ndarray):
|
/external/tensorflow/tensorflow/python/debug/cli/ |
D | tensor_format.py | 127 elif not isinstance(tensor, np.ndarray): 535 if not isinstance(tensor, np.ndarray) or not np.size(tensor):
|