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
solver.optimize requires a scalar function. If provided with a function that has one dimension or more, than solver.optimize (or actually sparse.take) spits out an error message that is not very helpful to end users. Example:
Traceback (most recent call last):
File "solver.py", line 834, in optimize
val, res, jac = _integrate_blocks(functional, residual, jacobian, arguments=lhs, mask=mask)
File "nutils/solver.py", line 981, in _integrate_blocks
res = [sparse.take(next(data), [m]) for m in mask]
File "nutils/solver.py", line 981, in <listcomp>
res = [sparse.take(next(data), [m]) for m in mask]
File "nutils/sparse.py", line 290, in take
assert axis == len(shape)
AssertionError
Let's raise an early (don't traverse into _integrate_blocks) and informative exception instead.
The text was updated successfully, but these errors were encountered:
solver.optimize
requires a scalar function. If provided with a function that has one dimension or more, thansolver.optimize
(or actuallysparse.take
) spits out an error message that is not very helpful to end users. Example:Traceback:
Let's raise an early (don't traverse into
_integrate_blocks
) and informative exception instead.The text was updated successfully, but these errors were encountered: