File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -296,6 +296,14 @@ template <> struct select_npy_type<uint16_t> { const static NPY_TYPES type = NPY
296296template <> struct select_npy_type <uint32_t > { const static NPY_TYPES type = NPY_ULONG; };
297297template <> struct select_npy_type <uint64_t > { const static NPY_TYPES type = NPY_UINT64; };
298298
299+ // Sanity checks; comment them out or change the numpy type below if you're compiling on
300+ // a platform where they don't apply
301+ static_assert (sizeof (long long ) == 8 );
302+ template <> struct select_npy_type <long long > { const static NPY_TYPES type = NPY_INT64; };
303+ static_assert (sizeof (unsigned long long ) == 8 );
304+ template <> struct select_npy_type <unsigned long long > { const static NPY_TYPES type = NPY_UINT64; };
305+ // TODO: add int, long, etc.
306+
299307template <typename Numeric>
300308PyObject* get_array (const std::vector<Numeric>& v)
301309{
You can’t perform that action at this time.
0 commit comments