openworm / behavioral_syntax

behavioral syntax analysis based on the paper of Andre Brown
Other
5 stars 1 forks source link

interpolate over NaNs in angle #1

Closed ghost closed 9 years ago

ghost commented 9 years ago

find clever way to interpolate over NaNs returned by angle.py: -pd.Series doesn't do the job I need it to do:

In [163]: x Out[163]: array([ nan, 3., 4., 5., nan]) In [164]: import pandas as pd In [165]: pd.Series(x).interpolate().values Out[165]: array([ nan, 3., 4., 5., 5.])