#include <pybind11/numpy.h>
#include <pybind11/stl.h>
#include "pybind11_tests.h"
#include <cstdint>
#include <utility>
Go to the source code of this file.
Classes | |
struct | DtypeCheck |
struct | DtypeSizeCheck |
Macros | |
#define | def_index_fn(name, type) |
Typedefs | |
using | arr = py::array |
using | arr_t = py::array_t< uint16_t, 0 > |
Functions | |
template<typename T > | |
DtypeCheck | get_dtype_check (const char *name) |
std::vector< DtypeCheck > | get_concrete_dtype_checks () |
template<typename T > | |
DtypeSizeCheck | get_dtype_size_check () |
std::vector< DtypeSizeCheck > | get_platform_dtype_size_checks () |
template<typename... Ix> | |
arr | data (const arr &a, Ix... index) |
template<typename... Ix> | |
arr | data_t (const arr_t &a, Ix... index) |
template<typename... Ix> | |
arr & | mutate_data (arr &a, Ix... index) |
template<typename... Ix> | |
arr_t & | mutate_data_t (arr_t &a, Ix... index) |
template<typename... Ix> | |
py::ssize_t | index_at (const arr &a, Ix... idx) |
template<typename... Ix> | |
py::ssize_t | index_at_t (const arr_t &a, Ix... idx) |
template<typename... Ix> | |
py::ssize_t | offset_at (const arr &a, Ix... idx) |
template<typename... Ix> | |
py::ssize_t | offset_at_t (const arr_t &a, Ix... idx) |
template<typename... Ix> | |
py::ssize_t | at_t (const arr_t &a, Ix... idx) |
template<typename... Ix> | |
arr_t & | mutate_at_t (arr_t &a, Ix... idx) |
template<typename T , typename T2 > | |
py::handle | auxiliaries (T &&r, T2 &&r2) |
TEST_SUBMODULE (numpy_array, sm) | |
Variables | |
static int | data_i = 42 |
Definition at line 135 of file test_numpy_array.cpp.
using arr = py::array |
Definition at line 77 of file test_numpy_array.cpp.
using arr_t = py::array_t<uint16_t, 0> |
Definition at line 78 of file test_numpy_array.cpp.
py::ssize_t at_t | ( | const arr_t & | a, |
Ix... | idx | ||
) |
Definition at line 126 of file test_numpy_array.cpp.
Referenced by TEST_SUBMODULE().
py::handle auxiliaries | ( | T && | r, |
T2 && | r2 | ||
) |
Definition at line 142 of file test_numpy_array.cpp.
Referenced by TEST_SUBMODULE().
Definition at line 82 of file test_numpy_array.cpp.
Referenced by xpath_allocator::allocate(), xpath_node_set_raw::append(), as_wide_impl(), type_caster< Type, enable_if_t< is_eigen_sparse< Type >::value > >::cast(), convert_buffer_generic(), convert_buffer_latin1(), convert_buffer_output(), convert_buffer_output_generic(), xml_buffered_writer::flush(), get_buffer_encoding(), get_latin1_7bit_prefix_length(), get_valid_length(), guess_buffer_encoding(), cpp_function::initialize(), is_tensor_aligned(), type_caster< Eigen::Ref< PlainObjectType, 0, StrideType >, enable_if_t< is_eigen_dense_map< Eigen::Ref< PlainObjectType, 0, StrideType > >::value > >::load(), parse_declaration_encoding(), utf16_decoder< opt_swap >::process(), utf32_decoder< opt_swap >::process(), utf8_decoder::process(), latin1_decoder::process(), wchar_decoder::process(), xpath_node_set_raw::push_back_grow(), return_bytes(), set_shared_data(), test_array_ctors(), TEST_SUBMODULE(), pugi::xml_writer_file::write(), pugi::xml_writer_stream::write(), xml_buffered_writer::write_buffer(), xml_buffered_writer::write_direct(), and xml_buffered_writer::write_string().
Definition at line 87 of file test_numpy_array.cpp.
Referenced by TEST_SUBMODULE().
std::vector< DtypeCheck > get_concrete_dtype_checks | ( | ) |
Definition at line 33 of file test_numpy_array.cpp.
Referenced by TEST_SUBMODULE().
DtypeCheck get_dtype_check | ( | const char * | name | ) |
Definition at line 25 of file test_numpy_array.cpp.
DtypeSizeCheck get_dtype_size_check | ( | ) |
Definition at line 54 of file test_numpy_array.cpp.
std::vector< DtypeSizeCheck > get_platform_dtype_size_checks | ( | ) |
Definition at line 63 of file test_numpy_array.cpp.
Referenced by TEST_SUBMODULE().
py::ssize_t index_at | ( | const arr & | a, |
Ix... | idx | ||
) |
Definition at line 110 of file test_numpy_array.cpp.
Referenced by TEST_SUBMODULE().
py::ssize_t index_at_t | ( | const arr_t & | a, |
Ix... | idx | ||
) |
Definition at line 114 of file test_numpy_array.cpp.
Referenced by TEST_SUBMODULE().
Definition at line 130 of file test_numpy_array.cpp.
Referenced by TEST_SUBMODULE().
Definition at line 92 of file test_numpy_array.cpp.
Referenced by TEST_SUBMODULE().
Definition at line 101 of file test_numpy_array.cpp.
Referenced by TEST_SUBMODULE().
py::ssize_t offset_at | ( | const arr & | a, |
Ix... | idx | ||
) |
Definition at line 118 of file test_numpy_array.cpp.
Referenced by TEST_SUBMODULE().
py::ssize_t offset_at_t | ( | const arr_t & | a, |
Ix... | idx | ||
) |
Definition at line 122 of file test_numpy_array.cpp.
Referenced by TEST_SUBMODULE().
TEST_SUBMODULE | ( | numpy_array | , |
sm | |||
) |
Definition at line 162 of file test_numpy_array.cpp.
References at_t(), auxiliaries(), data(), data_i, data_t(), def_index_fn, get_concrete_dtype_checks(), get_platform_dtype_size_checks(), index_at(), index_at_t(), mutate_at_t(), mutate_data(), mutate_data_t(), DtypeSizeCheck::name, DtypeCheck::numpy, offset_at(), offset_at_t(), DtypeCheck::pybind11, self, DtypeSizeCheck::size_cpp, and DtypeSizeCheck::size_numpy.
|
static |
Definition at line 160 of file test_numpy_array.cpp.
Referenced by TEST_SUBMODULE().