eigenpy.cpp
Go to the documentation of this file.
1 /*
2  * Copyright 2014-2019, CNRS
3  * Copyright 2018-2023, INRIA
4  */
5 
6 #include "eigenpy/eigenpy.hpp"
7 
8 #include <stdlib.h>
9 
10 namespace eigenpy {
11 
12 void seed(unsigned int seed_value) { srand(seed_value); }
13 
14 void exposeMatrixBool();
15 void exposeMatrixInt();
16 void exposeMatrixLong();
17 void exposeMatrixFloat();
18 void exposeMatrixDouble();
20 
24 
25 void exposeNoneType();
26 
27 /* Enable Eigen-Numpy serialization for a set of standard MatrixBase instances.
28  */
29 void enableEigenPy() {
30  using namespace Eigen;
31  import_numpy();
32 
34 
35  bp::def("sharedMemory", (void (*)(const bool))NumpyType::sharedMemory,
36  bp::arg("value"),
37  "Share the memory when converting from Eigen to Numpy.");
38 
39  bp::def("sharedMemory", (bool (*)())NumpyType::sharedMemory,
40  "Status of the shared memory when converting from Eigen to Numpy.\n"
41  "If True, the memory is shared when converting an Eigen::Matrix to a "
42  "numpy.array.\n"
43  "Otherwise, a deep copy of the Eigen::Matrix is performed.");
44 
45  bp::def("seed", &seed, bp::arg("seed_value"),
46  "Initialize the pseudo-random number generator with the argument "
47  "seed_value.");
48 
55 
59 
61 }
62 
63 } // namespace eigenpy
void seed(unsigned int seed_value)
Definition: eigenpy.cpp:12
static bool sharedMemory()
Definition: numpy-type.cpp:32
void exposeMatrixLong()
Definition: matrix-long.cpp:8
void exposeNoneType()
Definition: optional.cpp:8
Definition: complex.cpp:7
void exposeMatrixDouble()
void EIGENPY_DLLAPI enableEigenPy()
Definition: eigenpy.cpp:29
void EIGENPY_DLLAPI import_numpy()
Definition: numpy.cpp:8
void exposeMatrixFloat()
Definition: matrix-float.cpp:8
void exposeMatrixLongDouble()
void exposeMatrixInt()
Definition: matrix-int.cpp:8
void exposeMatrixComplexFloat()
void exposeMatrixBool()
Definition: matrix-bool.cpp:8
void exposeMatrixComplexLongDouble()
void exposeMatrixComplexDouble()
static void registerException()
Definition: exception.cpp:21


eigenpy
Author(s): Justin Carpentier, Nicolas Mansard
autogenerated on Fri Jun 2 2023 02:10:26