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 }}
This repository has been archived by the owner on Nov 18, 2023. It is now read-only.
Change from forM_ to numLoop causes some problems since "forM_ [1..0] ..." executes zero times but "numLoop 1 0 ..." will cause an infinite loop. For example "joinBlocks (identity 1, identity 0, identity 0, identity 0)" will crash in version 0.3.4.0 but in 0.3.3.0 it returned 1x1 matrix.
To be honest, I have never considered empty matrices, nor matrices of negative size. However, I am guessing you encountered this problem by using them somehow. I admit that if they worked before was by accident. But yes, I consider this a regression. After all, applying splitBlocks to a 1x1 matrix (which is a valid matrix) will indeed generate 3 empty matrices. The problem of going back to forM_ is that it would be a performance regression. I will contact the maintainer of the loop package and see if numLoop can be adapted to handle these cases. Otherwise, I will create my own version.
Change from forM_ to numLoop causes some problems since "forM_ [1..0] ..." executes zero times but "numLoop 1 0 ..." will cause an infinite loop. For example "joinBlocks (identity 1, identity 0, identity 0, identity 0)" will crash in version 0.3.4.0 but in 0.3.3.0 it returned 1x1 matrix.
Version 0.3.3.0:
Prelude Data.Matrix> joinBlocks (identity 1, identity 0, identity 0, identity 0)
( 1 )
Version 0.3.4.0:
Prelude Data.Matrix> joinBlocks (identity 1, identity 0, identity 0, identity 0)
( *** Exception: ./Data/Vector/Generic/Mutable.hs:597 (write): index out of bounds (1,1)
The text was updated successfully, but these errors were encountered: