Classes | Macros | Typedefs | Functions | Variables
test_numpy_array.cpp File Reference
#include <pybind11/numpy.h>
#include <pybind11/stl.h>
#include "pybind11_tests.h"
#include <cstdint>
#include <utility>
Include dependency graph for test_numpy_array.cpp:

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... Ix>
py::ssize_t at_t (const arr_t &a, Ix... idx)
 
template<typename T , typename T2 >
py::handle auxiliaries (T &&r, T2 &&r2)
 
template<typename... Ix>
arr data (const arr &a, Ix... index)
 
template<typename... Ix>
arr data_t (const arr_t &a, Ix... index)
 
std::vector< DtypeCheckget_concrete_dtype_checks ()
 
template<typename T >
DtypeCheck get_dtype_check (const char *name)
 
template<typename T >
DtypeSizeCheck get_dtype_size_check ()
 
std::vector< DtypeSizeCheckget_platform_dtype_size_checks ()
 
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>
arr_tmutate_at_t (arr_t &a, Ix... idx)
 
template<typename... Ix>
arrmutate_data (arr &a, Ix... index)
 
template<typename... Ix>
arr_tmutate_data_t (arr_t &a, Ix... index)
 
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)
 
 TEST_SUBMODULE (numpy_array, sm)
 

Variables

static int data_i = 42
 

Macro Definition Documentation

◆ def_index_fn

#define def_index_fn (   name,
  type 
)
Value:
sm.def(#name, [](type a) { return name(a); }); \
sm.def(#name, [](type a, int i) { return name(a, i); }); \
sm.def(#name, [](type a, int i, int j) { return name(a, i, j); }); \
sm.def(#name, [](type a, int i, int j, int k) { return name(a, i, j, k); });

Definition at line 135 of file test_numpy_array.cpp.

Typedef Documentation

◆ arr

using arr = py::array

Definition at line 77 of file test_numpy_array.cpp.

◆ arr_t

using arr_t = py::array_t<uint16_t, 0>

Definition at line 78 of file test_numpy_array.cpp.

Function Documentation

◆ at_t()

template<typename... Ix>
py::ssize_t at_t ( const arr_t a,
Ix...  idx 
)

Definition at line 126 of file test_numpy_array.cpp.

◆ auxiliaries()

template<typename T , typename T2 >
py::handle auxiliaries ( T &&  r,
T2 &&  r2 
)

Definition at line 142 of file test_numpy_array.cpp.

◆ data()

template<typename... Ix>
arr data ( const arr a,
Ix...  index 
)

Definition at line 82 of file test_numpy_array.cpp.

◆ data_t()

template<typename... Ix>
arr data_t ( const arr_t a,
Ix...  index 
)

Definition at line 87 of file test_numpy_array.cpp.

◆ get_concrete_dtype_checks()

std::vector<DtypeCheck> get_concrete_dtype_checks ( )

Definition at line 33 of file test_numpy_array.cpp.

◆ get_dtype_check()

template<typename T >
DtypeCheck get_dtype_check ( const char *  name)

Definition at line 25 of file test_numpy_array.cpp.

◆ get_dtype_size_check()

template<typename T >
DtypeSizeCheck get_dtype_size_check ( )

Definition at line 54 of file test_numpy_array.cpp.

◆ get_platform_dtype_size_checks()

std::vector<DtypeSizeCheck> get_platform_dtype_size_checks ( )

Definition at line 63 of file test_numpy_array.cpp.

◆ index_at()

template<typename... Ix>
py::ssize_t index_at ( const arr a,
Ix...  idx 
)

Definition at line 110 of file test_numpy_array.cpp.

◆ index_at_t()

template<typename... Ix>
py::ssize_t index_at_t ( const arr_t a,
Ix...  idx 
)

Definition at line 114 of file test_numpy_array.cpp.

◆ mutate_at_t()

template<typename... Ix>
arr_t& mutate_at_t ( arr_t a,
Ix...  idx 
)

Definition at line 130 of file test_numpy_array.cpp.

◆ mutate_data()

template<typename... Ix>
arr& mutate_data ( arr a,
Ix...  index 
)

Definition at line 92 of file test_numpy_array.cpp.

◆ mutate_data_t()

template<typename... Ix>
arr_t& mutate_data_t ( arr_t a,
Ix...  index 
)

Definition at line 101 of file test_numpy_array.cpp.

◆ offset_at()

template<typename... Ix>
py::ssize_t offset_at ( const arr a,
Ix...  idx 
)

Definition at line 118 of file test_numpy_array.cpp.

◆ offset_at_t()

template<typename... Ix>
py::ssize_t offset_at_t ( const arr_t a,
Ix...  idx 
)

Definition at line 122 of file test_numpy_array.cpp.

◆ TEST_SUBMODULE()

TEST_SUBMODULE ( numpy_array  ,
sm   
)

Definition at line 162 of file test_numpy_array.cpp.

Variable Documentation

◆ data_i

int data_i = 42
static

Definition at line 160 of file test_numpy_array.cpp.

name
Annotation for function names.
Definition: attr.h:51
gtsam.examples.DogLegOptimizerExample.type
type
Definition: DogLegOptimizerExample.py:111
name
static char name[]
Definition: rgamma.c:72
j
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2
a
ArrayXXi a
Definition: Array_initializer_list_23_cxx11.cpp:1
i
int i
Definition: BiCGSTAB_step_by_step.cpp:9


gtsam
Author(s):
autogenerated on Thu Dec 19 2024 04:08:42