-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix int conversion #455
Fix int conversion #455
Conversation
Hi ! This project doesn't usually accept pull requests on the main branch. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jorisv Amazing. Thanks a lot for the big fix which will help to better support Windows applications
91d0e61
to
cacaf18
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
scrumptious
int_conv: Add more integer type binding and add a unit test changelog: Add changelog entry int_conv: Manage int8_t and long on Windows int_conv: Try to use stdint type to manage long hack on windows int_conv: Fix Windows build int_conv: Try to fix Mac build and don't compile twice 64 bits integer on Mac and Windows int_conv: Don't use np.dtypes (introduced in numpy 1.25) int_conv: Test long and int difference in unit test [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci int_conv: Expose long in MacOS int_conv: Don't use deprecated type np.intc int_conv: Fix Mac build int_conv: Remove int128 (doesn't exists) int_conv: Disable long long test on Mac because the type is not reachable int_conv: Begin to work on promotion int_conv: Add unsigned promotion int_conv: Manage complex promotion int_conv: Split matrix binding to avoid memory issue while building int_conv: Split decomposition binding to avoid memory issue while building int_conv: Use clongdouble instead of complex256 int_conv: Avoid out of heap space error on Windows int_conv: Fix test for Mac int_conv: Try to manage longlong on Mac and int on Windows, also reduce compile time int_conv: Manage Windows and Mac int and long long when casting int_conv: Allow scalar to complex conversion int_conv: Manage casting from numpy to eigen with tensor int_conv: Add changelog entries int_conv: Remove conversion from Eigen to Numpy int_conv: Add reference to this PR int_conv: Activate SciPy tests by default
cb528d8
to
670a147
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the hard work @jorisv !!
## [3.5.0] - 2024-04-14 ### Added - Allow use of installed JRL-cmakemodule (stack-of-tasks/eigenpy#446) - Support of Numpy 2.0.0b1 (stack-of-tasks/eigenpy#448) - Support new primitive type (char, int8_t, uint8_t, int16_t, uint16_t, uint32_t, uint64_t) ()stack-of-tasks/eigenpy#455) - Support conversion between signed <-> unsigned integers (stack-of-tasks/eigenpy#455) - Support conversion between complex numbers (stack-of-tasks/eigenpy#455) ### Fixed - Fix unit test build in C++11 (stack-of-tasks/eigenpy#442) - Fix unit test function signature [#443](stack-of-tasks/eigenpy#443) - Fix CMake export (stack-of-tasks/eigenpy#446) - Fix `int` management on Windows (stack-of-tasks/eigenpy#455) - Fix `long long` management on Mac (stack-of-tasks/eigenpy#455) - Allow to run test in the build directory on Windows (stack-of-tasks/eigenpy#457) ### Removed - Remove casting when converting from Eigen scalar to Numpy scalar. This should not remove any functionality since Numpy array are created from the Eigen scalar type (stack-of-tasks/eigenpy#455)
Close #449
Changes
int
management on Windows (NPY_INT32 is NPY_LONG, then NPY_INT is never used on Windows)long long
management on Mac (NPY_LONGLONG and NPY_LONG are both 64 bits andlong
andlong long
are the same type on Mac, then there is only one C++ type that must old two different dtype)This should not remove any functionality since Numpy array are created from the Eigen scalar type
Comparison between numpy dtype in Linux/Mac/Windows
Notes
long double
long
is 32 bits where is 64 bits on Mac/Linuxlong
is not the same type thanint
andint32_t
(but it's also a 32 bits integer)long long
is not the same type thanlong
andint64_t
(but it's also a 64 bits integer)long
is not the same type thanint64_t
(but it's also a 64 bits integer)int
andlong
long
andlong long
are the same C++ typeTODO
Linux table
Mac table
Windows table