File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed
Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -348,13 +348,19 @@ template <> struct select_npy_type<uint16_t> { const static NPY_TYPES type = NPY
348348template <> struct select_npy_type <uint32_t > { const static NPY_TYPES type = NPY_ULONG; };
349349template <> struct select_npy_type <uint64_t > { const static NPY_TYPES type = NPY_UINT64; };
350350
351- // Sanity checks; comment them out or change the numpy type below if you're compiling on
352- // a platform where they don't apply
351+ #ifndef DISABLE_TYPE_SIZE_SANITY_CHECK
352+ // Sanity checks; comment them out or change the numpy type below if you're
353+ // compiling on a platform where they don't apply
353354static_assert (sizeof (long long ) == 8 , " size check failed" );
354- template <> struct select_npy_type <long long > { const static NPY_TYPES type = NPY_INT64; };
355+ template <> struct select_npy_type <long long > {
356+ const static NPY_TYPES type = NPY_INT64;
357+ };
355358static_assert (sizeof (unsigned long long ) == 8 , " size check failed" );
356- template <> struct select_npy_type <unsigned long long > { const static NPY_TYPES type = NPY_UINT64; };
357-
359+ template <> struct select_npy_type <unsigned long long > {
360+ const static NPY_TYPES type = NPY_UINT64;
361+ };
362+ #endif
363+
358364template <typename Numeric>
359365PyObject* get_array (const std::vector<Numeric>& v)
360366{
You can’t perform that action at this time.
0 commit comments