/external/autotest/client/cros/audio/ |
audio_data.py | 95 np_array = np.fromstring(binary, dtype=np_dtype) 96 n_frames = len(np_array) / self.channel 97 # Reshape np_array into an array of shape (n_frames, channel). 98 np_array = np_array.reshape(n_frames, self.channel) 100 self.channel_data = np_array.transpose()
|
/external/tensorflow/tensorflow/lite/python/interpreter_wrapper/ |
interpreter_wrapper.cc | 134 PyObject* np_array = PyArrayFromIntVector(interpreter_->inputs().data(), local 137 return PyArray_Return(reinterpret_cast<PyArrayObject*>(np_array)); 141 PyObject* np_array = PyArrayFromIntVector(interpreter_->outputs().data(), local 144 return PyArray_Return(reinterpret_cast<PyArrayObject*>(np_array)); 222 PyObject* np_array = local 225 return PyArray_Return(reinterpret_cast<PyArrayObject*>(np_array)); 350 PyObject* np_array = local 352 PyArray_ENABLEFLAGS(reinterpret_cast<PyArrayObject*>(np_array), 354 return PyArray_Return(reinterpret_cast<PyArrayObject*>(np_array)); 400 PyArrayObject* np_array local [all...] |
/external/tensorflow/tensorflow/contrib/slim/python/slim/data/ |
tfexample_decoder_test.py | 258 np_array = np.array([[['ab'], ['cd'], ['ef']], 263 'labels': self._BytesFeature(np_array), 286 labels = labels.astype(np_array.dtype) 287 self.assertTrue(np.array_equal(np_array, labels)) 290 np_array = np.random.rand(2, 3, 1).astype('f') 294 'array': self._EncodedFloatFeature(np_array), 302 'array': parsing_ops.FixedLenFeature(np_array.shape, dtypes.float32) 310 self.assertAllEqual(tf_array.eval(), np_array) 313 np_array = np.random.randint(1, 10, size=(2, 3, 1)) 317 'array': self._EncodedInt64Feature(np_array), [all...] |
/external/tensorflow/tensorflow/contrib/image/python/ops/ |
sparse_image_warp.py | 40 def _expand_to_minibatch(np_array, batch_size): 41 """Tile arbitrarily-sized np_array to include new batch dimension.""" 42 tiles = [batch_size] + [1] * np_array.ndim 43 return np.tile(np.expand_dims(np_array, 0), tiles)
|
/external/tensorflow/tensorflow/python/lib/core/ |
ndarray_tensor_bridge.cc | 207 PyObject* np_array = local 215 if (PyArray_SetBaseObject(reinterpret_cast<PyArrayObject*>(np_array), 220 *result = PyArray_Return(reinterpret_cast<PyArrayObject*>(np_array));
|
py_func.cc | 449 PyArrayObject* np_array = reinterpret_cast<PyArrayObject*>(obj); local 453 PyObject** out = reinterpret_cast<PyObject**>(PyArray_DATA(np_array)); 468 memcpy(PyArray_DATA(np_array), p.data(), p.size()); 470 *ret = PyArray_Return(np_array);
|
/external/tensorflow/tensorflow/python/client/ |
session_test.py | [all...] |
/external/autotest/client/cros/multimedia/ |
audio_facade_native.py | 51 np_array = np.fromstring(binary, dtype='<i2') 52 return not np.any(np_array)
|
/external/tensorflow/tensorflow/contrib/factorization/python/ops/ |
wals_test.py | 48 def np_array_to_sparse(self, np_array): 50 return factorization_ops_test_utils.np_matrix_to_tf_sparse(np_array)
|
/external/tensorflow/tensorflow/python/kernel_tests/ |
fifo_queue_test.py | [all...] |
padding_fifo_queue_test.py | [all...] |
py_func_test.py | 256 np_array = np.array([1.0, 2.0], dtype=np.float32) 257 tf_array = script_ops.py_func(lambda: np_array, [], [dtypes.float32]) 260 self.assertAllEqual(np_array, [1.0, 2.0])
|
/external/tensorflow/tensorflow/python/framework/ |
test_util.py | [all...] |