Skip to content
Snippets Groups Projects
Commit e64fadf3 authored by cmaffeo2's avatar cmaffeo2
Browse files

Ingore invalid argument to arccos when finding stack in segmentmodel_from_lists

parent 74d1ddf7
No related branches found
No related tags found
No related merge requests found
...@@ -67,7 +67,8 @@ def find_stacks(centers, transforms): ...@@ -67,7 +67,8 @@ def find_stacks(centers, transforms):
_z = np.array((0,0,1)) _z = np.array((0,0,1))
for i in np.unique(idx1): for i in np.unique(idx1):
js = idx2[ idx1 == i ] 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 ) angles = np.array( angles )
tmp = np.argmin(dists[i][js] + 1.0*angles) tmp = np.argmin(dists[i][js] + 1.0*angles)
j = js[tmp] j = js[tmp]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment