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

Error in leg2d.m: interp1q and number of output args. #137

Closed
moorepants opened this issue Jul 3, 2017 · 3 comments
Closed

Error in leg2d.m: interp1q and number of output args. #137

moorepants opened this issue Jul 3, 2017 · 3 comments

Comments

@moorepants
Copy link
Member

  1. I found a typo in gaitanalysis/octave/2d_inverse_dynamics/leg2d.m where interp1 was called interp1q instead.

Now I’m getting the error:
/usr/local/lib/python2.7/site-packages/gaitanalysis/gait.pyc in inverse_dynamics_2d(self, left_leg_markers, right_leg_markers, left_leg_forces, right_leg_forces, body_mass, low_pass_cutoff)
240 angles, velocities, moments, forces =
241 octave.leg2d(time, marker_array, normalized_force_array,
--> 242 options)
243
244 dynamics = angles, velocities, moments, forces

ValueError: too many values to unpack

It seems leg2d.m only returns its first argument for some reason, the angles.

@moorepants
Copy link
Member Author

User fixed it with:

I believe the only other change I adding the red text below to line 240 in gaitanalysis/gait.py:

[angles, velocities, moments, forces] = \
                octave.leg2d(time, marker_array, normalized_force_array,
                             options, nout=4)

@neildhir
Copy link

In addition interp1q has been deprecated from Octave, and they now say use interp1 instead. Currently the nosetests come up with:
Oct2PyError: Octave evaluation error: error: 'interp1q' undefined near line 94 column 24

@moorepants
Copy link
Member Author

This is now fixed in master.

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

No branches or pull requests

2 participants