eigenpy 3.12.0
Bindings between Numpy and Eigen using Boost.Python
Loading...
Searching...
No Matches
python-compat.hpp
1//
2// Copyright (c) 2024 INRIA
3//
4//
5
6#ifndef __eigenpy_utils_python_compat_hpp__
7#define __eigenpy_utils_python_compat_hpp__
8
9#if PY_MAJOR_VERSION >= 3
10
11#define PyInt_Check PyLong_Check
12
13#define PyStr_Check PyUnicode_Check
14#define PyStr_FromString PyUnicode_FromString
15
16#else
17
18#define PyStr_Check PyString_Check
19#define PyStr_FromString PyString_FromString
20
21#endif
22
23#endif // ifndef __eigenpy_utils_python_compat_hpp__