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
The reason the average angle is nan is because there are nan in branch angles, and that is because sometimes there are duplicate points in the swc data, so that the local vector is [0,0,0] which yields [nan, nan, nan] if we normalizing the vector.
The current fix is to check if the vector is 0 or not then decide whether normalize it, and also (although not necessary if we do the checking) change np.mean() to np.nanmean() when calculating the average of angles.
The best fix is, of course, to check if there are duplicate points in swc.
I think in the long run it would be good to provide such a fixing method, that gets rid of duplicate points.
But only as a processing function like we discussed. Should I open a new enhancement issue for that?
When doing
The summary shows a
nan
at the average local angle entryThe text was updated successfully, but these errors were encountered: