File tree 1 file changed +8
-0
lines changed
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
296
296
template <> struct select_npy_type <uint32_t > { const static NPY_TYPES type = NPY_ULONG; };
297
297
template <> struct select_npy_type <uint64_t > { const static NPY_TYPES type = NPY_UINT64; };
298
298
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
+
299
307
template <typename Numeric>
300
308
PyObject* get_array (const std::vector<Numeric>& v)
301
309
{
You can’t perform that action at this time.
0 commit comments