Commit e64fadf3 authored by cmaffeo2's avatar cmaffeo2
Browse files

Ingore invalid argument to arccos when finding stack in segmentmodel_from_lists

parent 74d1ddf7
......@@ -67,7 +67,8 @@ def find_stacks(centers, transforms):
_z = np.array((0,0,1))
for i in np.unique(idx1):
js = idx2[ idx1 == i ]
angles = [np.arccos( transforms[j].T.dot( transforms[i].dot(_z) ).dot( _z ) ) for j in js]
with np.errstate(divide='ignore',invalid='ignore'):
angles = [np.arccos( transforms[j].T.dot( transforms[i].dot(_z) ).dot( _z ) ) for j in js]
angles = np.array( angles )
tmp = np.argmin(dists[i][js] + 1.0*angles)
j = js[tmp]
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment