Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crash calling .solve() on an assembly with no constraints #591

Closed
greyltc opened this issue Jan 18, 2021 · 0 comments · Fixed by #592
Closed

crash calling .solve() on an assembly with no constraints #591

greyltc opened this issue Jan 18, 2021 · 0 comments · Fixed by #592

Comments

@greyltc
Copy link
Contributor

greyltc commented Jan 18, 2021

line 139, in main
    asy.solve()
  File "/usr/lib/python3.9/site-packages/cadquery/assembly.py", line 408, in solve
    locs_new = solver.solve()
  File "/usr/lib/python3.9/site-packages/cadquery/occ_impl/solver.py", line 212, in solve
    res = minimize(
  File "/usr/lib/python3.9/site-packages/scipy/optimize/_minimize.py", line 614, in minimize
    return _minimize_bfgs(fun, x0, args, jac, callback, **options)
  File "/usr/lib/python3.9/site-packages/scipy/optimize/optimize.py", line 1164, in _minimize_bfgs
    gnorm = vecnorm(gfk, ord=norm)
  File "/usr/lib/python3.9/site-packages/scipy/optimize/optimize.py", line 166, in vecnorm
    return np.amax(np.abs(x))
  File "<__array_function__ internals>", line 5, in amax
  File "/usr/lib/python3.9/site-packages/numpy/core/fromnumeric.py", line 2705, in amax
    return _wrapreduction(a, np.maximum, 'max', axis, None, out,
  File "/usr/lib/python3.9/site-packages/numpy/core/fromnumeric.py", line 87, in _wrapreduction
    return ufunc.reduce(obj, axis, dtype, out, **passkwargs)
ValueError: zero-size array to reduction operation maximum which has no identity
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant