Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix arrays with zero-size dimensions
When converting an array to an Eigen matrix, ignore the strides is any dimension size is 0. If the array is empty, the strides aren't relevant, and especially numpy ≥ 1.23 explicitly sets the strides to 0 in this case. (See numpy commit dd5ab7b11520.) Update tests to verify that this works, and continues to work. (This test likely would have caught the behavior change with numpy 1.23.) This expands on the tests added by #38, but also reverts the logic change from that PR, as it is no longer needed, and brings the code closer in line with upstream, since #38 was never pushed upstream.
- Loading branch information