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
If constraint.A is a sparse matrix, A will be a 2d array of (1, 1) with the sparse matrix in A[0][0], breaking the A.dot(x) due to shape mismatch. Example:
Differential evolution breaks if a LinearConstraint built with a sparse matrix is given as argument.
LinearConstraint's A parameter can be a sparse matrix:
Yet when differential evolution does:
If
constraint.A
is a sparse matrix, A will be a 2d array of (1, 1) with the sparse matrix inA[0][0]
, breaking theA.dot(x)
due to shape mismatch. Example:If
constraint.A
is a Sparse matrix, it is guaranteed to havendims == 2
and should not benp.atleast_2d
ed.Minimum working example of the problem:
The text was updated successfully, but these errors were encountered: