keenon / AddBiomechanics

A tool to automatically process and share biomechanics data
https://addbiomechanics.org/
Other
26 stars 5 forks source link

`Subject::write_b3d_file`: skip residual calculation if all zeros #228

Closed nickbianco closed 6 months ago

nickbianco commented 6 months ago

Related to https://github.com/keenon/nimblephysics/pull/205.

If all residuals are zero (e.g., if no residuals to report since foot body names were wrong), then skip computing the mean residuals which produces numpy warnings (i.e., bad idea to take the mean of an empty vector).