Searched refs:np (Results 1 - 25 of 1116) sorted by relevance

1234567891011>>

/external/valgrind/none/tests/linux/
H A Dmremap.c31 char *np; local
35 np = mremap(p, 1024*1024, 256*1024, 0); /* shrink, fixed */
36 if (np == (char *)-1)
38 if (np != p)
39 fprintf(stderr, "shrink, nomove: p=%p np=%p: shrink moved?!\n",
40 p, np);
41 if (np != (char *)-1)
42 munmap(np, 256*1024);
45 np = mremap(p, 1024*1024, 256*1024, MREMAP_MAYMOVE); /* shrink, maymove */
46 if (np
[all...]
/external/tensorflow/tensorflow/compiler/tests/
H A Dnary_ops_test.py23 import numpy as np namespace
58 [np.array([[1, 2, 3]], dtype=np.float32)],
59 expected=np.array([[1, 2, 3]], dtype=np.float32))
62 [np.array([1, 2], dtype=np.float32),
63 np.array([10, 20], dtype=np.float32)],
64 expected=np
[all...]
H A Dbinary_ops_test.py21 import numpy as np namespace
69 np.array([[[[-1, 2.00009999], [-3, b]]]], dtype=dtype),
70 np.array([[[[a, 2], [-3.00009, 4]]]], dtype=dtype),
71 expected=np.array([[[[False, True], [True, False]]]], dtype=dtype))
75 np.array([3, 3, -1.5, -8, 44], dtype=dtype),
76 np.array([2, -2, 7, -4, 0], dtype=dtype),
77 expected=np.array(
84 np.array([1, 2], dtype=dtype),
85 np.zeros(shape=[0, 2], dtype=dtype),
86 expected=np
[all...]
H A Ddynamic_stitch_test.py21 import numpy as np namespace
53 idx1 = np.array([0, 2], dtype=np.int32)
54 idx2 = np.array([[1], [3]], dtype=np.int32)
55 val1 = np.array([[], []], dtype=np.int32)
56 val2 = np.array([[[]], [[]]], dtype=np.int32)
59 expected=np
[all...]
H A Dternary_ops_test.py21 import numpy as np namespace
45 np.float32(1),
46 np.float32(2),
47 np.int32(1),
48 expected=np.array([1], dtype=np.float32))
51 np.float32(1),
52 np.float32(4),
53 np.int32(3),
54 expected=np
[all...]
H A Dgather_nd_op_test.py21 import numpy as np namespace
43 np.array([7, 7, 8], dtype=dtype),
45 np.array([8, 1, 2, 3, 7, 5], dtype=dtype),
46 np.array([[4], [4], [0]], np.int32)))
50 params = np.ones((3, 3), dtype=np.float32)
52 indices_empty = np.empty((0, 2), dtype=np.int32)
54 self.assertAllClose(np
[all...]
H A Dnullary_ops_test.py21 import numpy as np namespace
47 np.float32(42),
48 np.array([], dtype=np.float32),
49 np.array([1, 2], dtype=np.float32),
50 np.array([[1, 2, 3], [4, 5, 6]], dtype=np.float32),
51 np.array([[[1, 2], [3, 4], [5, 6]], [[10, 20], [30, 40], [50, 60]]],
52 dtype=np
[all...]
H A Dunary_ops_test.py23 import numpy as np namespace
40 return np.transpose(x, [0, rank - 1] + list(range(1, rank - 1)))
85 np.array([1, 2, 3, 4], dtype=dtype),
86 np.array([[1, 0, 0, 0], [0, 2, 0, 0], [0, 0, 3, 0], [0, 0, 0, 4]],
90 np.arange(36).reshape([2, 3, 2, 3]).astype(dtype),
91 np.array([[0, 7, 14], [21, 28, 35]], dtype=dtype))
93 array_ops.diag, np.array([[1, 2], [3, 4]], dtype=dtype),
94 np.array(
101 np.array([[-1, 1]], dtype=dtype),
102 expected=np
[all...]
H A Dscatter_nd_op_test.py23 import numpy as np namespace
32 return v.astype(vtype) if isinstance(v, np.ndarray) else vtype(v)
67 ref = np.zeros(shape, dtype=updates.dtype)
79 np.random.seed(8)
91 for coord, _ in np.ndenumerate(np.empty(indexable_area_shape, vtype))
93 np.random.shuffle(all_indices)
94 indices = np.array(all_indices[:num_updates])
99 indices = np.append(
100 indices, [indices[np
[all...]
/external/tensorflow/tensorflow/contrib/reduce_slice_ops/python/kernel_tests/
H A Dreduce_slice_ops_test.py21 import numpy as np namespace
31 x = np.array([1, 40, 700], dtype=np.int32)
32 indices = np.array([[0, 1], [0, 3], [1, 2], [1, 3], [0, 2]], dtype=np.int32)
33 result = np.array([1, 741, 40, 740, 41], dtype=np.int32)
39 x = np.array([[1, 2, 3], [40, 50, 60], [700, 800, 900]], dtype=np.int32)
40 indices = np
[all...]
/external/tensorflow/tensorflow/contrib/learn/python/learn/datasets/
H A Dsynthetic.py21 import numpy as np namespace
63 np.random.seed(seed)
65 linspace = np.linspace(0, 2 * np.pi, n_samples // n_classes)
66 circ_x = np.empty(0, dtype=np.int32)
67 circ_y = np.empty(0, dtype=np.int32)
68 base_cos = np.cos(linspace)
69 base_sin = np
[all...]
/external/tensorflow/tensorflow/python/kernel_tests/
H A Dcast_op_test.py21 import numpy as np namespace
39 if dtype == np.float32:
41 elif dtype == np.float64:
43 elif dtype == np.int32:
45 elif dtype == np.int64:
47 elif dtype == np.bool:
49 elif dtype == np.complex64:
51 elif dtype == np.complex128:
58 val = constant_op.constant(x, self._toDataType(np.array([x]).dtype))
71 np
[all...]
H A Ddeterminant_op_test.py21 import numpy as np namespace
40 np_ans = np.ones(shape[:-2]).astype(matrix_x.dtype)
42 np_ans = np.array(np.linalg.det(matrix_x)).astype(matrix_x.dtype)
50 np_sign, np_ans = (1.0, np.zeros(shape[:-2]).astype(matrix_x.dtype))
52 np_sign, np_ans = np.linalg.slogdet(matrix_x)
59 sign_tf_val * np.exp(abs_log_det_tf_val),
60 np_sign * np.exp(np_ans),
72 self._compareDeterminant(np.array([[2., 3.], [3., 4.]]).astype(np
[all...]
H A Done_hot_op_test.py21 import numpy as np namespace
56 indices = np.asarray([0, 2, -1, 1], dtype=np.int64)
58 on_value = np.asarray(1.0, dtype=dtype)
59 off_value = np.asarray(-1.0, dtype=dtype)
61 truth = np.asarray(
86 indices = np.asarray([0, 2, -1, 1], dtype=np.int64)
89 truth = np.asarray(
102 self._testBasic(np
[all...]
H A Dtranspose_op_test.py23 import numpy as np namespace
37 ret = np.copy(x)
44 np_ans = np.conj(np_ans)
54 xs = list(np.shape(x))
55 ys = list(np.shape(tf_ans))
56 if x.dtype in [np.float32, np.complex64]:
60 elif x.dtype in [np.float64, np.complex128]:
70 np_ans = np
[all...]
H A Dcwise_ops_test.py23 import numpy as np namespace
63 def _sparsify(x, thresh=0.5, index_dtype=np.int64):
66 non_zero = np.where(x)
67 x_indices = np.vstack(non_zero).astype(index_dtype).T
78 if dtype == np.float16:
80 elif dtype in (np.float32, np.complex64):
82 elif dtype in (np.float64, np.complex128):
98 if x.dtype in (np
[all...]
H A Dtrace_op_test.py20 import numpy as np namespace
29 x = np.random.seed(0)
32 np_ans = np.trace(x, axis1=-2, axis2=-1)
38 for dtype in [np.int32, np.float32, np.float64]:
40 x = np.random.rand(np.prod(shape)).astype(dtype).reshape(shape)
/external/tensorflow/tensorflow/contrib/data/python/kernel_tests/
H A Dconcatenate_dataset_op_test.py20 import numpy as np namespace
31 input_components = (np.tile(np.array([[1], [2], [3], [4]]), 20),
32 np.tile(np.array([[12], [13], [14], [15]]), 4))
33 to_concatenate_components = (np.tile(
34 np.array([[5], [6], [7], [8], [9]]), 20), var_array)
41 array = np.tile(np.array([[16], [17], [18], [19], [20]]), 15)
42 diff_array = np
[all...]
/external/tensorflow/tensorflow/contrib/factorization/python/kernel_tests/
H A Dwals_solver_ops_test.py21 import numpy as np namespace
29 ind = np.array(
30 [[0, 0], [0, 2], [1, 1], [2, 0], [2, 1], [3, 2]]).astype(np.int64)
31 val = np.array([0.1, 0.2, 1.1, 2.0, 2.1, 3.2]).astype(np.float32)
32 shape = np.array([4, 3]).astype(np.int64)
39 self._column_factors = np.array([
43 ]).astype(np.float32)
44 self._row_factors = np
[all...]
/external/tensorflow/tensorflow/python/estimator/inputs/queues/
H A Dfeeding_functions_test.py23 import numpy as np namespace
41 key: val.tolist() if isinstance(val, np.ndarray) else val
50 array = np.arange(32).reshape([16, 2])
65 array = np.arange(32).reshape([16, 2])
81 array = np.arange(5) + 10
107 array = np.arange(32).reshape([16, 2])
115 np.arange(32).reshape([16, 2]).tolist() * 6 +
122 array = np.arange(2) + 10
136 array1 = np.arange(32, 64)
137 array2 = np
[all...]
/external/tensorflow/tensorflow/python/data/kernel_tests/
H A Dconcatenate_dataset_op_test.py20 import numpy as np namespace
33 np.tile(np.array([[1], [2], [3], [4]]), 20),
34 np.tile(np.array([[12], [13], [14], [15]]), 15),
35 np.array([37.0, 38.0, 39.0, 40.0]))
37 np.tile(np.array([[1], [2], [3], [4], [5]]), 20),
38 np.tile(np
[all...]
/external/tensorflow/tensorflow/contrib/distributions/python/kernel_tests/bijectors/
H A Dsinh_arcsinh_bijector_test.py21 import numpy as np namespace
45 x = np.array([[[-2.01], [2.], [1e-4]]]).astype(np.float32)
46 y = np.sinh((np.arcsinh(x) + skewness) * tailweight)
50 np.sum(
51 np.log(np.cosh(np.arcsinh(y) / tailweight - skewness)) -
52 np
[all...]
/external/syslinux/gpxe/src/drivers/net/
H A Dnatsemi.c106 struct natsemi_private *np = container_of ( basher, struct natsemi_private, local
111 eereg = inb ( np->ioaddr + EE_REG );
117 struct natsemi_private *np = container_of ( basher, struct natsemi_private, local
122 eereg = inb ( np->ioaddr + EE_REG );
125 outb ( eereg, np->ioaddr + EE_REG );
147 static void natsemi_init_eeprom ( struct natsemi_private *np ) {
151 np->spibit.basher.op = &natsemi_basher_ops;
152 np->spibit.bus.mode = SPI_MODE_THREEWIRE;
153 np->spibit.endianness = SPI_BIT_LITTLE_ENDIAN;
154 init_spi_bit_basher ( &np
174 struct natsemi_private *np = NULL; local
249 struct natsemi_private *np = netdev->priv; local
331 struct natsemi_private *np = netdev->priv; local
439 struct natsemi_private *np = netdev->priv; local
458 struct natsemi_private *np = netdev->priv; local
501 struct natsemi_private *np = netdev->priv; local
593 struct natsemi_private *np = netdev->priv; local
[all...]
/external/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.members/
H A Ddecimal_point.pass.cpp24 const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l); local
25 assert(np.decimal_point() == '.');
29 const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l); local
30 assert(np.decimal_point() == L'.');
H A Dgrouping.pass.cpp24 const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l); local
25 assert(np.grouping() == std::string());
29 const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l); local
30 assert(np.grouping() == std::string());

Completed in 1321 milliseconds

1234567891011>>