|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r65778 - sandbox/numpy/libs/python/numpy/src
From: talljimbo_at_[hidden]
Date: 2010-10-05 20:31:10
Author: jbosch
Date: 2010-10-05 20:31:09 EDT (Tue, 05 Oct 2010)
New Revision: 65778
URL: http://svn.boost.org/trac/boost/changeset/65778
Log:
boost.python.numpy - fixed missing bool instantiation for dtype::get_builtin
Text files modified:
sandbox/numpy/libs/python/numpy/src/dtype.cpp | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
Modified: sandbox/numpy/libs/python/numpy/src/dtype.cpp
==============================================================================
--- sandbox/numpy/libs/python/numpy/src/dtype.cpp (original)
+++ sandbox/numpy/libs/python/numpy/src/dtype.cpp 2010-10-05 20:31:09 EDT (Tue, 05 Oct 2010)
@@ -57,6 +57,7 @@
template <typename T>
dtype dtype::get_builtin() { return dtype_traits<T>::get(); }
+NUMPY_DTYPE_TRAITS_BUILTIN(bool, NPY_BOOL);
NUMPY_DTYPE_TRAITS_BUILTIN(npy_ubyte, NPY_UBYTE);
NUMPY_DTYPE_TRAITS_BUILTIN(npy_byte, NPY_BYTE);
NUMPY_DTYPE_TRAITS_BUILTIN(npy_ushort, NPY_USHORT);
@@ -76,14 +77,16 @@
NUMPY_DTYPE_TRAITS_COMPLEX(double, npy_cdouble, NPY_CDOUBLE);
NUMPY_DTYPE_TRAITS_COMPLEX(long double, npy_clongdouble, NPY_CLONGDOUBLE);
+#if 0
template <> struct dtype_traits<bool> {
static dtype get() {
- if (sizeof(bool) == sizeof(npy_bool)) return dtype_traits<npy_bool>::get();
if (sizeof(bool) == sizeof(npy_ubyte)) return dtype_traits<npy_ubyte>::get();
+ if (sizeof(bool) == sizeof(npy_bool)) return dtype_traits<npy_bool>::get();
PyErr_SetString(PyExc_TypeError, "Cannot determine numpy dtype corresponding to C++ bool.");
throw_error_already_set();
}
};
template dtype dtype::get_builtin<bool>();
+#endif
}}} // namespace boost::python::numpy
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk