mirror of
https://github.com/boostorg/python.git
synced 2026-01-19 04:22:16 +00:00
Fix more missing symbols.
This commit is contained in:
@@ -90,7 +90,7 @@ struct builtin_dtype<T,true> {
|
||||
};
|
||||
|
||||
template <>
|
||||
struct builtin_dtype<bool,true> {
|
||||
struct BOOST_NUMPY_DECL builtin_dtype<bool,true> {
|
||||
static dtype get();
|
||||
};
|
||||
|
||||
|
||||
@@ -11,29 +11,33 @@
|
||||
#include <boost/python/numpy/internal.hpp>
|
||||
|
||||
#define DTYPE_FROM_CODE(code) \
|
||||
dtype(python::detail::new_reference(reinterpret_cast<PyObject*>(PyArray_DescrFromType(code))))
|
||||
dtype(python::detail::new_reference(reinterpret_cast<PyObject*>(PyArray_DescrFromType(code))))
|
||||
|
||||
#define BUILTIN_INT_DTYPE(bits) \
|
||||
template <> struct builtin_int_dtype< bits, false > { \
|
||||
static dtype get() { return DTYPE_FROM_CODE(NPY_INT ## bits); } \
|
||||
}; \
|
||||
template <> struct builtin_int_dtype< bits, true > { \
|
||||
static dtype get() { return DTYPE_FROM_CODE(NPY_UINT ## bits); } \
|
||||
}; \
|
||||
template dtype get_int_dtype< bits, false >(); \
|
||||
template dtype get_int_dtype< bits, true >()
|
||||
template <> struct builtin_int_dtype<bits, false> \
|
||||
{ \
|
||||
static dtype get() { return DTYPE_FROM_CODE(NPY_INT ## bits);} \
|
||||
}; \
|
||||
template <> struct builtin_int_dtype<bits, true> \
|
||||
{ \
|
||||
static dtype get() { return DTYPE_FROM_CODE(NPY_UINT ## bits);} \
|
||||
}; \
|
||||
template BOOST_NUMPY_DECL dtype get_int_dtype<bits, false>(); \
|
||||
template BOOST_NUMPY_DECL dtype get_int_dtype<bits, true>()
|
||||
|
||||
#define BUILTIN_FLOAT_DTYPE(bits) \
|
||||
template <> struct builtin_float_dtype< bits > { \
|
||||
static dtype get() { return DTYPE_FROM_CODE(NPY_FLOAT ## bits); } \
|
||||
}; \
|
||||
template dtype get_float_dtype< bits >()
|
||||
template <> struct builtin_float_dtype<bits> \
|
||||
{ \
|
||||
static dtype get() { return DTYPE_FROM_CODE(NPY_FLOAT ## bits);} \
|
||||
}; \
|
||||
template BOOST_NUMPY_DECL dtype get_float_dtype<bits>()
|
||||
|
||||
#define BUILTIN_COMPLEX_DTYPE(bits) \
|
||||
template <> struct builtin_complex_dtype< bits > { \
|
||||
static dtype get() { return DTYPE_FROM_CODE(NPY_COMPLEX ## bits); } \
|
||||
}; \
|
||||
template dtype get_complex_dtype< bits >()
|
||||
template <> struct builtin_complex_dtype<bits> \
|
||||
{ \
|
||||
static dtype get() { return DTYPE_FROM_CODE(NPY_COMPLEX ## bits);} \
|
||||
}; \
|
||||
template BOOST_NUMPY_DECL dtype get_complex_dtype<bits>()
|
||||
|
||||
namespace boost { namespace python { namespace converter {
|
||||
NUMPY_OBJECT_MANAGER_TRAITS_IMPL(PyArrayDescr_Type, numpy::dtype)
|
||||
|
||||
Reference in New Issue
Block a user