Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

### Fixed
- Remove CMake CMP0167 warnings ([#487](https://github.com/stack-of-tasks/eigenpy/pull/487))
- Fix compilation error on armhf ([#488](https://github.com/stack-of-tasks/eigenpy/pull/488))

## [3.7.0] - 2024-06-11

Expand Down
17 changes: 12 additions & 5 deletions include/eigenpy/numpy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ void EIGENPY_DLLAPI import_numpy();
int EIGENPY_DLLAPI PyArray_TypeNum(PyTypeObject* type);

// By default, the Scalar is considered as a Python object
template <typename Scalar>
template <typename Scalar, typename Enable = void>
struct NumpyEquivalentType {
enum { type_code = NPY_USERDEF };
};
Expand Down Expand Up @@ -139,12 +139,19 @@ struct NumpyEquivalentType<unsigned long> {
// See https://github.com/stack-of-tasks/eigenpy/pull/455
#if defined __linux__

template <>
struct NumpyEquivalentType<long long> {
#include <type_traits>

template <typename Scalar>
struct NumpyEquivalentType<
Scalar, std::enable_if_t<!std::is_same<int64_t, long long>::value &&
std::is_same<Scalar, long long>::value> > {
enum { type_code = NPY_LONGLONG };
};
template <>
struct NumpyEquivalentType<unsigned long long> {
template <typename Scalar>
struct NumpyEquivalentType<
Scalar,
std::enable_if_t<!std::is_same<uint64_t, unsigned long long>::value &&
std::is_same<Scalar, unsigned long long>::value> > {
enum { type_code = NPY_ULONGLONG };
};

Expand Down