Lines Matching refs:array_t
79 using arr_t = py::array_t<uint16_t, 0>;
186 sm.def("make_f_array", [] { return py::array_t<float>({ 2, 2 }, { 4, 8 }); }); in TEST_SUBMODULE()
187 sm.def("make_c_array", [] { return py::array_t<float>({ 2, 2 }, { 8, 4 }); }); in TEST_SUBMODULE()
216 return py::array_t<int>({2}, {4}, a.data, obj); in TEST_SUBMODULE()
228 return py::isinstance<py::array_t<double>>(o) && !py::isinstance<py::array_t<int>>(o); in TEST_SUBMODULE()
235 "array_t<int32>"_a=py::array_t<std::int32_t>(), in TEST_SUBMODULE()
236 "array_t<double>"_a=py::array_t<double>() in TEST_SUBMODULE()
242 "array_t<int32>"_a=py::array_t<std::int32_t>(o), in TEST_SUBMODULE()
243 "array_t<double>"_a=py::array_t<double>(o) in TEST_SUBMODULE()
248 sm.def("overloaded", [](py::array_t<double>) { return "double"; }); in TEST_SUBMODULE()
249 sm.def("overloaded", [](py::array_t<float>) { return "float"; }); in TEST_SUBMODULE()
250 sm.def("overloaded", [](py::array_t<int>) { return "int"; }); in TEST_SUBMODULE()
251 sm.def("overloaded", [](py::array_t<unsigned short>) { return "unsigned short"; }); in TEST_SUBMODULE()
252 sm.def("overloaded", [](py::array_t<long long>) { return "long long"; }); in TEST_SUBMODULE()
253 sm.def("overloaded", [](py::array_t<std::complex<double>>) { return "double complex"; }); in TEST_SUBMODULE()
254 sm.def("overloaded", [](py::array_t<std::complex<float>>) { return "float complex"; }); in TEST_SUBMODULE()
256 sm.def("overloaded2", [](py::array_t<std::complex<double>>) { return "double complex"; }); in TEST_SUBMODULE()
257 sm.def("overloaded2", [](py::array_t<double>) { return "double"; }); in TEST_SUBMODULE()
258 sm.def("overloaded2", [](py::array_t<std::complex<float>>) { return "float complex"; }); in TEST_SUBMODULE()
259 sm.def("overloaded2", [](py::array_t<float>) { return "float"; }); in TEST_SUBMODULE()
264 sm.def("overloaded3", [](py::array_t<int>) { return "int"; }, py::arg{}.noconvert()); in TEST_SUBMODULE()
265 sm.def("overloaded3", [](py::array_t<double>) { return "double"; }, py::arg{}.noconvert()); in TEST_SUBMODULE()
269 sm.def("overloaded4", [](py::array_t<long long, 0>) { return "long long"; }); in TEST_SUBMODULE()
270 sm.def("overloaded4", [](py::array_t<double, 0>) { return "double"; }); in TEST_SUBMODULE()
274 sm.def("overloaded5", [](py::array_t<unsigned int>) { return "unsigned int"; }); in TEST_SUBMODULE()
275 sm.def("overloaded5", [](py::array_t<double>) { return "double"; }); in TEST_SUBMODULE()
284 sm.def("proxy_add2", [](py::array_t<double> a, double v) { in TEST_SUBMODULE()
292 py::array_t<double, py::array::c_style> a({ 3, 3, 3 }); in TEST_SUBMODULE()
301 py::array_t<double, py::array::f_style> a({ 3, 3, 3 }); in TEST_SUBMODULE()
309 sm.def("proxy_squared_L2_norm", [](py::array_t<double> a) { in TEST_SUBMODULE()
317 sm.def("proxy_auxiliaries2", [](py::array_t<double> a) { in TEST_SUBMODULE()
323 sm.def("proxy_auxiliaries1_const_ref", [](py::array_t<double> a) { in TEST_SUBMODULE()
329 sm.def("proxy_auxiliaries2_const_ref", [](py::array_t<double> a) { in TEST_SUBMODULE()
337 sm.def("proxy_add2_dyn", [](py::array_t<double> a, double v) { in TEST_SUBMODULE()
345 py::array_t<double, py::array::c_style> a({ 3, 3, 3 }); in TEST_SUBMODULE()
354 sm.def("proxy_auxiliaries2_dyn", [](py::array_t<double> a) { in TEST_SUBMODULE()
358 sm.def("array_auxiliaries2", [](py::array_t<double> a) { in TEST_SUBMODULE()
365 sm.def("array_t_fail_test", []() { return py::array_t<double>(py::object()); }); in TEST_SUBMODULE()
371 …sm.def("array_initializer_list1", []() { return py::array_t<float>(1); }); // { 1 } also works, bu… in TEST_SUBMODULE()
372 sm.def("array_initializer_list2", []() { return py::array_t<float>({ 1, 2 }); }); in TEST_SUBMODULE()
373 sm.def("array_initializer_list3", []() { return py::array_t<float>({ 1, 2, 3 }); }); in TEST_SUBMODULE()
374 sm.def("array_initializer_list4", []() { return py::array_t<float>({ 1, 2, 3, 4 }); }); in TEST_SUBMODULE()
378 sm.def("array_reshape2", [](py::array_t<double> a) { in TEST_SUBMODULE()
386 sm.def("array_resize3", [](py::array_t<double> a, size_t N, bool refcheck) { in TEST_SUBMODULE()
393 py::array_t<double> a; in TEST_SUBMODULE()
405 [](py::array_t<double, 0>) {}, in TEST_SUBMODULE()
408 [](py::array_t<double, py::array::forcecast>) {}, in TEST_SUBMODULE()
411 [](py::array_t<double, py::array::c_style>) {}, in TEST_SUBMODULE()
414 [](py::array_t<double, py::array::forcecast | py::array::c_style>) {}, in TEST_SUBMODULE()
417 [](py::array_t<double, py::array::f_style>) {}, in TEST_SUBMODULE()
420 [](py::array_t<double, py::array::forcecast | py::array::f_style>) {}, in TEST_SUBMODULE()
423 [](py::array_t<double, 0>) {}, in TEST_SUBMODULE()
426 [](py::array_t<double, py::array::forcecast>) {}, in TEST_SUBMODULE()
429 [](py::array_t<double, py::array::c_style>) {}, in TEST_SUBMODULE()
432 [](py::array_t<double, py::array::forcecast | py::array::c_style>) {}, in TEST_SUBMODULE()
435 [](py::array_t<double, py::array::f_style>) {}, in TEST_SUBMODULE()
438 [](py::array_t<double, py::array::forcecast | py::array::f_style>) {}, in TEST_SUBMODULE()