-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix 2D Nx1/1xN inputs to eigen dense vector args
This fixes a bug introduced in b68959e when passing in a two-dimensional, but conformable, array as the value for a compile-time Eigen vector (such as VectorXd or RowVectorXd). The commit switched to using numpy to copy into the eigen data, but this broke the described case because numpy refuses to broadcast a (N,1) into a (N). This commit fixes it by squeezing the input array whenever the output array is 1-dimensional, which will let the problematic case through. (This shouldn't squeeze inappropriately as dimension compatibility is already checked for conformability before getting to the copy code).
- Loading branch information
Showing
3 changed files
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters