You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ndarray from_iterator panics on rectangular column-major input #482
I found this while working on #480. The ndarray implementation of Array2::from_iterator does not handle column-major input correctly for rectangular matrices.
For example, from_iterator(1..=6, 2, 3, 1) should produce [[1, 3, 5], [2, 4, 6]]. The current implementation first builds a row-major array, reverses its axes, and then tries to reshape it in row-major order. For this input, the reshape fails and the method panics.
The fix is to use column-major order when reshaping the input for axis = 1. I will move that fix from #480 into a separate PR, with tests for both input orders and empty matrices, and a changelog entry.
Activity
chore: stamp the 0.6.16 release notes (#488)
fix(ndarray): preserve iterator storage order (smartcorelib#483)