/external/python/cpython3/Lib/test/ |
D | test_buffer.py | 29 ndarray = None variable 44 from numpy import ndarray as numpy_array 627 return ndarray(items, shape=shape, strides=strides, format=fmt, 737 if isinstance(nd, ndarray): 764 @unittest.skipUnless(ndarray, 'ndarray object required for this test') 816 if isinstance(result, ndarray) or is_memoryview_format(fmt): 871 expected = ndarray(trans, shape=shape, format=ff, 877 expected = ndarray(flattened, shape=shape, format=ff) 900 y = ndarray(initlst, shape=shape, flags=ro, format=fmt) 920 y = ndarray(initlst, shape=shape, flags=ro|ND_FORTRAN, [all …]
|
D | test_picklebuffer.py | 78 ndarray = support.import_module("_testbuffer").ndarray 79 arr = ndarray(list(range(12)), shape=(4, 3), format='<i') 91 arr = ndarray(list(range(12)), shape=(3, 4), strides=(4, 12), format='<i') 112 ndarray = support.import_module("_testbuffer").ndarray 113 arr = ndarray(list(range(3)), shape=(3,), format='<h') 117 arr = ndarray(list(range(6)), shape=(2, 3), format='<h') 121 arr = ndarray(list(range(6)), shape=(2, 3), strides=(2, 4), 127 arr = ndarray(456, shape=(), format='<i') 138 ndarray = support.import_module("_testbuffer").ndarray 139 arr = ndarray(list(range(6)), shape=(6,), format='<i')[::2] [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 | 189 self.assertEqual(type(spec.minimum), np.ndarray) 190 self.assertEqual(type(spec.maximum), np.ndarray) 213 self.assertIsInstance(spec.minimum, np.ndarray) 214 self.assertIsInstance(spec.maximum, np.ndarray)
|
/external/tensorflow/tensorflow/python/ops/numpy_ops/ |
D | np_interop_test.py | 99 self.assertIsInstance(dx, np.ndarray) 100 self.assertIsInstance(dy, np.ndarray) 161 self.assertIsInstance(sq, np.ndarray) 177 self.assertIsInstance(sq, onp.ndarray) 222 self.assertIsInstance(values[0], np.ndarray) 223 self.assertIsInstance(values[1], np.ndarray) 224 self.assertIsInstance(values[2], np.ndarray) 247 self.assertIsInstance(result, np.ndarray) 258 self.assertIsInstance(value_from_dataset, np.ndarray) 265 self.assertIsInstance(value_from_dataset, np.ndarray) [all …]
|
D | np_array_ops.py | 134 if not isinstance(shape, np_arrays.ndarray): 224 if isinstance(a, np_arrays.ndarray) and ( 358 if isinstance(a, np_arrays.ndarray) and dtype == a.dtype.as_numpy_dtype: 367 isinstance(t1, np_arrays.ndarray) and dtype == t1.dtype.as_numpy_dtype): 370 isinstance(t2, np_arrays.ndarray) and dtype == t2.dtype.as_numpy_dtype): 744 setattr(np_arrays.ndarray, '__round__', around) 1038 if isinstance(arrays, (np_arrays.ndarray, ops.Tensor)): 1046 a if isinstance(a, np_arrays.ndarray) else a for a in arrays 1056 a if isinstance(a, np_arrays.ndarray) else a for a in arrays 1070 a if isinstance(a, np_arrays.ndarray) else a for a in arrays [all …]
|
D | np_logic_test.py | 92 self.assertIsInstance(actual, np_arrays.ndarray) 102 return s if not isinstance(s, np_arrays.ndarray) else s.numpy()
|
D | np_arrays.py | 54 ndarray = ops.Tensor variable
|
D | np_arrays_test.py | 58 if not isinstance(out, np_arrays.ndarray): 205 self.assertIsInstance(repacked[0], np_arrays.ndarray) 206 self.assertIsInstance(repacked[1], np_arrays.ndarray)
|
/external/tensorflow/tensorflow/lite/experimental/quantization_debugger/ |
D | debugger.py | 53 Callable[[np.ndarray], argument 56 str, Callable[[Sequence[np.ndarray], Sequence[np.ndarray]], argument 90 Iterable[Sequence[np.ndarray]]]] = None, argument 230 tensor_data: Sequence[np.ndarray], argument 264 interpreter: tf.lite.Interpreter) -> List[np.ndarray]:
|
/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/tpu/ |
D | device_assignment.py | 70 def __init__(self, topology: Topology, core_assignment: np.ndarray): argument 123 def core_assignment(self) -> np.ndarray: 180 computation_shape: Optional[np.ndarray] = None, argument 181 computation_stride: Optional[np.ndarray] = None, argument 339 computation_shape: Optional[np.ndarray] = None, argument 340 computation_stride: Optional[np.ndarray] = None, argument
|
/external/tensorflow/tensorflow/python/kernel_tests/ |
D | tensor_priority_test.py | 30 class NumpyArraySubclass(np.ndarray): 68 class NumpyArraySubclass(np.ndarray):
|
/external/python/pybind11/tests/ |
D | test_numpy_vectorize.py | 248 assert not isinstance(m.vectorized_func(1, 2, 3), np.ndarray) 249 assert not isinstance(m.vectorized_func(np.array(1), 2, 3), np.ndarray) 251 assert isinstance(z, np.ndarray) 254 assert isinstance(z, np.ndarray)
|
/external/tensorflow/tensorflow/python/distribute/ |
D | zero_batch_test.py | 204 self.assertNotAllEqual(np.ndarray([0, 0, 0]), bn.moving_mean.numpy()) 205 self.assertNotAllEqual(np.ndarray([1, 1, 1]), bn.moving_variance.numpy()) 206 self.assertNotAllEqual(np.ndarray([1, 1, 1]), bn.gamma.numpy()) 207 self.assertNotAllEqual(np.ndarray([0, 0, 0]), bn.beta.numpy())
|
/external/tensorflow/tensorflow/python/compiler/tensorrt/model_tests/ |
D | model_handler.py | 90 batch_size: Optional[int] = None) -> np.ndarray: 176 output_tensors: Sequence[np.ndarray], argument 237 ) -> Mapping[str, Union[np.ndarray, framework_ops.Tensor]]: 291 ) -> Mapping[str, np.ndarray]: 299 inputs: Optional[Mapping[str, np.ndarray]] = None, argument 424 calibration_inputs: Optional[Mapping[str, np.ndarray]] = None, argument 471 calibration_inputs: Optional[Mapping[str, np.ndarray]] = None, argument 492 inputs: Optional[Mapping[str, np.ndarray]] = None, argument
|
/external/tensorflow/tensorflow/python/ops/ragged/ |
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/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/lite/java/src/main/native/ |
D | tensor_jni.cc | 220 jobjectArray ndarray = static_cast<jobjectArray>(dst); in ReadMultiDimensionalArray() local 221 int len = env->GetArrayLength(ndarray); in ReadMultiDimensionalArray() 224 jarray row = static_cast<jarray>(env->GetObjectArrayElement(ndarray, i)); in ReadMultiDimensionalArray() 275 jobjectArray ndarray = static_cast<jobjectArray>(src); in WriteMultiDimensionalArray() local 276 int len = env->GetArrayLength(ndarray); in WriteMultiDimensionalArray() 279 jobject row = env->GetObjectArrayElement(ndarray, i); in WriteMultiDimensionalArray()
|
/external/tensorflow/tensorflow/python/keras/layers/preprocessing/ |
D | preprocessing_stage.py | 57 (dataset_ops.DatasetV2, np.ndarray, ops.EagerTensor)): 177 not isinstance(datum, (np.ndarray, ops.EagerTensor)) for datum in data
|
D | hashing.py | 157 if isinstance(inp, (list, tuple, np.ndarray)): 165 tensor_util.is_tf_type(inp) or isinstance(inp, np.ndarray)
|
/external/tensorflow/tensorflow/python/eager/ |
D | pywrap_tensor_test.py | 30 self.assertIsInstance(result, np.ndarray)
|
/external/tensorflow/tensorflow/python/lib/core/ |
D | ndarray_tensor.h | 38 Status NdarrayToTensor(TFE_Context* ctx, PyObject* ndarray,
|