Searched refs:dtype (Results 1 - 9 of 9) sorted by relevance
/gem5/ext/pybind11/tests/ |
H A D | test_numpy_dtypes.py | 13 ld = np.dtype('longdouble') 14 return np.dtype({'names': ['bool_', 'uint_', 'float_', 'ldbl_'], 21 return np.dtype([('bool_', '?'), ('uint_', 'u4'), ('float_', 'f4'), ('ldbl_', 'g')]) 33 ld = np.dtype('longdouble') 41 np.dtype('longdouble').itemsize, e='<' if byteorder == 'little' else '>') 45 return 12 + 4 * (np.dtype('uint64').alignment > 4) + 8 + 8 * ( 46 np.dtype('longdouble').alignment > 8) 50 ld = np.dtype('longdouble') 56 ld = np.dtype('longdouble') 65 np.testing.assert_equal(actual, np.array(expected_data, dtype [all...] |
H A D | test_numpy_array.py | 73 assert m.offset_at(arr, *args) == ret * arr.dtype.itemsize 74 assert m.offset_at_t(arr, *args) == ret * arr.dtype.itemsize 186 a1 = np.array([1, 2], dtype=np.int16) 191 a1 = np.array([[1, 2], [3, 4]], dtype=np.float32, order='F') 196 a1 = np.array([[1, 2], [3, 4]], dtype=np.float32, order='C') 223 assert np.all(ac_view_1 == np.array([1, 2], dtype=np.int32)) 260 assert defaults["array"].dtype == np.array([]).dtype 261 assert defaults["array_t<int32>"].dtype == np.int32 262 assert defaults["array_t<double>"].dtype [all...] |
H A D | test_numpy_dtypes.cpp | 188 auto dtype = py::dtype("int32"); local 205 case 12: return py::array(dtype, shape, strides, vptr); 208 case 15: return py::array(dtype, shape, vptr); 214 case 22: return fill(py::array(dtype, shape, strides)); 217 case 25: return fill(py::array(dtype, shape)); 223 case 32: return py::array(dtype, 6, vptr); 229 case 42: return fill(py::array(dtype, 6)); 238 list.append(py::dtype("int32")); 239 list.append(py::dtype(st [all...] |
H A D | test_numpy_vectorize.py | 105 assert m.selective_func(np.array([1], dtype=np.int32)) == "Int branch taken." 106 assert m.selective_func(np.array([1.0], dtype=np.float32)) == "Float branch taken." 107 assert m.selective_func(np.array([1.0j], dtype=np.complex64)) == "Complex float branch taken." 128 z1 = np.array([[1, 2, 3, 4], [5, 6, 7, 8]], dtype='int32') 129 z2 = np.array(z1, dtype='float32') 130 z3 = np.array(z1, dtype='float64') 170 b = np.array([[10, 20, 30]], dtype='float64') 172 d = np.array([[1000], [2000], [3000]], dtype='int') 173 g = np.array([[1000000, 2000000, 3000000]], dtype='int') # requires casting 183 x = np.array([1, 2], dtype [all...] |
H A D | test_numpy_array.cpp | 17 // Size / dtype checks. 19 py::dtype numpy{}; 20 py::dtype pybind11{}; 27 check.numpy = np.attr("dtype")(np.attr(name)); 28 check.pybind11 = py::dtype::of<T>(); 51 py::dtype dtype{}; 59 check.dtype = py::dtype::of<T>(); 60 check.size_numpy = check.dtype [all...] |
H A D | test_stl_binders.py | 91 a = np.array([1, 2, 3, 4], dtype=np.int32) 95 a = np.array([[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]], dtype=np.uintc) 113 v = m.VectorStruct(np.zeros(3, dtype=np.dtype([('w', 'bool'), ('x', 'I'),
|
H A D | test_eigen.py | 73 zr = np.arange(30, dtype='float32').reshape(5, 6) # row-major 89 m.fixed_mutator_a(np.array([[1, 2], [3, 4]], dtype='float32')) 132 counting_mat = np.arange(9.0, dtype=np.float32).reshape((3, 3)) 142 counting_3d = np.arange(27.0, dtype=np.float32).reshape((3, 3, 3)) 159 counting_mat = np.arange(9.0, dtype=np.float32).reshape((3, 3)) 170 counting_3d = np.arange(27.0, dtype=np.float32).reshape((3, 3, 3)) 184 Invoked with: """ + repr(np.array([ 5., 4., 3.], dtype='float32')) # noqa: E501 line too long 192 Invoked with: """ + repr(np.array([ 7., 4., 1.], dtype='float32')) # noqa: E501 line too long 511 y = np.array(range(100), dtype='float64').reshape(10, 10) 519 yexpect = np.array(range(100), dtype [all...] |
/gem5/ext/pybind11/include/pybind11/ |
H A D | numpy.h | 444 class dtype : public object { 446 PYBIND11_OBJECT_DEFAULT(dtype, object, detail::npy_api::get().PyArrayDescr_Check_); 448 explicit dtype(const buffer_info &info) { 449 dtype descr(_dtype_from_pep3118()(PYBIND11_STR_TYPE(info.format))); 454 explicit dtype(const std::string &format) { 458 dtype(const char *format) : dtype(std::string(format)) { } 460 dtype(list names, list formats, list offsets, ssize_t itemsize) { 469 /// This is essentially the same as calling numpy.dtype(args) in Python. 470 static dtype from_arg [all...] |
/gem5/src/arch/arm/insts/ |
H A D | pred_inst.hh | 166 vfp_modified_imm(uint8_t data, FpDataType dtype) argument 170 switch (dtype) {
|
Completed in 17 milliseconds