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
Describe the bug
The res: &mut [f64] slice in f2 (or f1) functions in ALM/PM constraints can be incorrect length.
A clear and concise description of what the bug is.
I was implementing an equality constraint in my code using OpEn, and realized that the output of JF_2(u)^T d should be 6x1 but the res: &mut [f64] slice was only of length 1, causing the code to panic when I tried to assign to res[0], res[1], ..., res[5]. When digging into this issue, I realized that I believe the same issue is present in the public example (explained below).
To Reproduce
Looking at the provided pm.rs example (though the same issue may be present for alm as well), the output of jf2t should be a 3x1 vector or, in other words, res should be a slice of length 3. However, res is, instead, a slice of length 1. This example appears to fail silently as res and u have zipped iterators, which just stops after the single entry of res without actually iterating through all of u as well.
Expected behavior
The output of jf2t should be length 3 and, thus, res should be a slice of length 3.
System information:
⚠️ Please, provide the following information:
System/Platform Mac
OS: MacOS
The text was updated successfully, but these errors were encountered:
Describe the bug
The
res: &mut [f64]
slice in f2 (or f1) functions in ALM/PM constraints can be incorrect length.A clear and concise description of what the bug is.
I was implementing an equality constraint in my code using OpEn, and realized that the output of JF_2(u)^T d should be 6x1 but the
res: &mut [f64]
slice was only of length 1, causing the code to panic when I tried to assign to res[0], res[1], ..., res[5]. When digging into this issue, I realized that I believe the same issue is present in the public example (explained below).To Reproduce
Looking at the provided pm.rs example (though the same issue may be present for alm as well), the output of
jf2t
should be a 3x1 vector or, in other words,res
should be a slice of length 3. However,res
is, instead, a slice of length 1. This example appears to fail silently asres
andu
have zipped iterators, which just stops after the single entry ofres
without actually iterating through all ofu
as well.Expected behavior
The output of
jf2t
should be length 3 and, thus,res
should be a slice of length 3.System information:
The text was updated successfully, but these errors were encountered: