HomeSort by relevance Sort by last modified time
    Searched refs:np (Results 1 - 25 of 1402) sorted by null

1 2 3 4 5 6 7 8 91011>>

  /external/tensorflow/tensorflow/compiler/tests/
nary_ops_test.py 23 import numpy as np
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.array([11, 22], dtype=np.float32)
    [all...]
binary_ops_test.py 23 import numpy as np
71 np.array([[[[-1, 2.00009999], [-3, b]]]], dtype=dtype),
72 np.array([[[[a, 2], [-3.00009, 4]]]], dtype=dtype),
73 expected=np.array([[[[False, True], [True, False]]]], dtype=dtype))
77 np.array([3, 3, -1.5, -8, 44], dtype=dtype),
78 np.array([2, -2, 7, -4, 0], dtype=dtype),
79 expected=np.array(
86 np.array([1, 2], dtype=dtype),
87 np.zeros(shape=[0, 2], dtype=dtype),
88 expected=np.zeros(shape=[0, 2], dtype=dtype)
    [all...]
dynamic_stitch_test.py 21 import numpy as np
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.array([[], [], [], []], np.int32)
    [all...]
gather_nd_op_test.py 21 import numpy as np
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.empty((0,), dtype=np.float32), gather_nd_ok_val
    [all...]
ternary_ops_test.py 21 import numpy as np
46 np.float32(1),
47 np.float32(2),
48 np.int32(1),
49 expected=np.array([1], dtype=np.float32))
52 np.float32(1),
53 np.float32(4),
54 np.int32(3),
55 expected=np.array([1, 2.5, 4], dtype=np.float32)
    [all...]
unary_ops_test.py 23 import numpy as np
40 return np.transpose(x, [0, rank - 1] + list(range(1, rank - 1)))
88 for dtype in self.numeric_types - {np.int8, np.uint8}:
90 array_ops.diag, np.array([1, 2, 3, 4], dtype=dtype),
91 np.array(
96 np.arange(36).reshape([2, 3, 2, 3]).astype(dtype),
97 np.array([[0, 7, 14], [21, 28, 35]], dtype=dtype))
99 array_ops.diag, np.array([[1, 2], [3, 4]], dtype=dtype),
100 np.array
    [all...]
dynamic_slice_ops_test.py 21 import numpy as np
48 np.array([], dtype=dtype),
49 np.array([], dtype=dtype),
50 np.array([0], dtype=np.int32)
52 expected=np.array([], dtype=dtype))
56 np.array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], dtype=dtype),
57 np.array([-1, -2, -3], dtype=dtype),
58 np.array([6], dtype=np.int32
    [all...]
xla_ops_test.py 22 import numpy as np
55 args=(np.array([1, 2, 3], dtype=dtype),
56 np.array([4, 5, 6], dtype=dtype)),
57 expected=np.array([5, 7, 9], dtype=dtype))
61 args=(np.array([[1, 2], [3, 4]], dtype=dtype),
62 np.array([7, 11], dtype=dtype)),
63 expected=np.array([[8, 9], [14, 15]], dtype=dtype))
67 args=(np.array([[1, 2], [3, 4]], dtype=dtype),
68 np.array([7, 11], dtype=dtype)),
69 expected=np.array([[8, 13], [10, 15]], dtype=dtype)
    [all...]
  /external/tensorflow/tensorflow/contrib/reduce_slice_ops/python/kernel_tests/
reduce_slice_ops_test.py 21 import numpy as np
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.array([[0, 1], [0, 3], [1, 2], [1, 3], [0, 2]], dtype=np.int32
    [all...]
  /external/tensorflow/tensorflow/contrib/learn/python/learn/datasets/
synthetic.py 26 import numpy as np
70 np.random.seed(seed)
72 linspace = np.linspace(0, 2 * np.pi, n_samples // n_classes)
73 circ_x = np.empty(0, dtype=np.int32)
74 circ_y = np.empty(0, dtype=np.int32)
75 base_cos = np.cos(linspace)
76 base_sin = np.sin(linspace
    [all...]
  /external/u-boot/include/dm/
of_access.h 38 static inline void of_node_put(const struct device_node *np) { }
46 * @np: Node pointer to check
49 int of_n_addr_cells(const struct device_node *np);
57 * @np: Node pointer to check
60 int of_n_size_cells(const struct device_node *np);
67 * @np: Node pointer to check
70 int of_simple_addr_cells(const struct device_node *np);
77 * @np: Node pointer to check
80 int of_simple_size_cells(const struct device_node *np);
85 * @np: Pointer to device node holding propert
    [all...]
  /external/tensorflow/tensorflow/python/keras/layers/
dense_attention_test.py 21 import numpy as np
34 scores = np.array([[[1.1]]], dtype=np.float32)
36 v = np.array([[[1.6]]], dtype=np.float32)
38 v_mask = np.array([[True]], dtype=np.bool_)
44 expected = np.array([[[1.6]]], dtype=np.float32)
49 scores = np.array([[[1.1]]], dtype=np.float32
    [all...]
  /external/tensorflow/tensorflow/python/data/kernel_tests/
from_tensor_slices_test.py 20 import numpy as np
38 np.tile(np.array([[1], [2], [3], [4]]), 20), np.tile(
39 np.array([[12], [13], [14], [15]]), 22),
40 np.array([37.0, 38.0, 39.0, 40.0])
60 indices=np.array([[0, 0], [1, 0], [2, 0]]),
61 values=np.array([0, 0, 0]),
62 dense_shape=np.array([3, 1])),
64 indices=np.array([[0, 0], [1, 1], [2, 2]])
    [all...]
interleave_test.py 21 import numpy as np
87 return [[value] * value for value in np.tile(values, count)]
123 ("1", np.int64([4, 5, 6]), 1, 3, None),
124 ("2", np.int64([4, 5, 6]), 1, 3, 1),
125 ("3", np.int64([4, 5, 6]), 2, 1, None),
126 ("4", np.int64([4, 5, 6]), 2, 1, 1),
127 ("5", np.int64([4, 5, 6]), 2, 1, 2),
128 ("6", np.int64([4, 5, 6]), 2, 3, None),
129 ("7", np.int64([4, 5, 6]), 2, 3, 1),
130 ("8", np.int64([4, 5, 6]), 2, 3, 2)
    [all...]
  /external/tensorflow/tensorflow/python/kernel_tests/boosted_trees/
training_ops_test.py 20 import numpy as np
46 feature1_nodes = np.array([0], dtype=np.int32)
47 feature1_gains = np.array([7.62], dtype=np.float32)
48 feature1_thresholds = np.array([52], dtype=np.int32)
49 feature1_left_node_contribs = np.array([[-4.375]], dtype=np.float32)
50 feature1_right_node_contribs = np.array([[7.143]], dtype=np.float32
    [all...]
  /bionic/libc/upstream-openbsd/lib/libc/stdlib/
getenv.c 51 const char *np; local
57 for (np = name, i = len; i && *cp; i--)
58 if (*cp++ != *np++)
76 const char *np; local
78 for (np = name; *np && *np != '='; ++np)
80 return (__findenv(name, (int)(np - name), &offset));
  /external/tensorflow/tensorflow/python/kernel_tests/
cwise_ops_unary_test.py 23 import numpy as np
43 def _sparsify(x, thresh=0.5, index_dtype=np.int64):
46 non_zero = np.where(x)
47 x_indices = np.vstack(non_zero).astype(index_dtype).T
61 if dtype == np.float16:
63 elif dtype in (np.float32, np.complex64):
65 elif dtype in (np.float64, np.complex128):
81 if x.dtype in (np.float32, np.float64
    [all...]
cast_op_test.py 21 import numpy as np
40 if dtype == np.float32:
42 elif dtype == np.float64:
44 elif dtype == np.int32:
46 elif dtype == np.int64:
48 elif dtype == np.bool:
50 elif dtype == np.complex64:
52 elif dtype == np.complex128:
59 val = constant_op.constant(x, self._toDataType(np.array([x]).dtype))
72 np.float32, np.float64, np.int64, np.complex64, np.complex12
    [all...]
  /external/tensorflow/tensorflow/contrib/distributions/python/kernel_tests/bijectors/
sinh_arcsinh_bijector_test.py 21 import numpy as np
44 x = np.array([[[-2.01], [2.], [1e-4]]]).astype(np.float32)
45 y = np.sinh((np.arcsinh(x) + skewness) * tailweight)
49 np.sum(
50 np.log(np.cosh(np.arcsinh(y) / tailweight - skewness)) -
51 np.log(tailweight) - np.log(np.sqrt(y**2 + 1))
    [all...]
  /external/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct/facet.numpunct.members/
decimal_point.pass.cpp 24 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'.');
thousands_sep.pass.cpp 24 const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l); local
25 assert(np.thousands_sep() == ',');
29 const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l); local
30 assert(np.thousands_sep() == L',');
  /external/tensorflow/tensorflow/contrib/constrained_optimization/python/
candidates_test.py 21 import numpy as np
31 objective_vector = np.array([1, 2, 3])
32 constraints_matrix = np.array([[1, 2, 3, 4], [5, 6, 7, 8]])
39 objective_vector = np.array([1, 2, 3])
40 constraints_matrix = np.array([[1, 2, 3, 4], [5, 6, 7, 8]])
47 objective_vector = np.array(
49 constraints_matrix = np.array(
55 self.assertTrue(np.all(distribution >= -1e-6))
56 self.assertAlmostEqual(np.sum(distribution), 1.0)
58 maximum_constraint_violation = np.amax
    [all...]
  /external/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/
decimal_point.pass.cpp 30 const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l); local
31 assert(np.decimal_point() == '.');
35 const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l); local
36 assert(np.decimal_point() == L'.');
43 const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l); local
44 assert(np.decimal_point() == '.');
48 const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l); local
49 assert(np.decimal_point() == L'.');
56 const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l); local
57 assert(np.decimal_point() == ',')
61 const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l); local
    [all...]
grouping.pass.cpp 34 const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l); local
35 assert(np.grouping() == "");
39 const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l); local
40 assert(np.grouping() == "");
47 const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l); local
48 assert(np.grouping() == "\3\3");
52 const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l); local
53 assert(np.grouping() == "\3\3");
65 const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l); local
66 assert(np.grouping() == group)
70 const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l); local
    [all...]
  /external/tensorflow/tensorflow/python/data/experimental/kernel_tests/serialization/
dataset_constructor_serialization_test.py 20 import numpy as np
32 components = (variable_array, np.array([1, 2, 3]), np.array(37.0))
38 arr = np.array(1)
40 diff_arr = np.array(2)
54 components = (np.tile(np.array([[1], [2], [3], [4]]), 20),
55 np.tile(np.array([[12], [13], [14], [15]]), 22),
56 np.array([37.0, 38.0, 39.0, 40.0])
    [all...]

Completed in 1726 milliseconds

1 2 3 4 5 6 7 8 91011>>