Structure-from-motion-python icon indicating copy to clipboard operation
Structure-from-motion-python copied to clipboard

Indices Error

Open anushkb opened this issue 6 years ago • 5 comments

Traceback (most recent call last): File "main.py", line 110, in graphList[i] = triangulateGraph(graphList[i],imageSize) File "/content/drive/SFM/utils/graph.py", line 84, in triangulateGraph x[cnt,:] = newGraph.obsVal[newGraph.ObsIdx[i][ind],:] IndexError: only integers, slices (:), ellipsis (...), numpy.newaxis (None) and integer or boolean arrays are valid indices

anushkb avatar Jul 04 '19 06:07 anushkb

Were you able to solve this?

njanirudh avatar Feb 21 '20 18:02 njanirudh

I also have the same error.

NavneetSajwan avatar May 26 '20 12:05 NavneetSajwan

write as x[cnt,:] = newGraph.obsVal[int(newGraph.ObsIdx[i][ind]), :]

ZHANG-SHI-CHANG avatar Sep 08 '20 06:09 ZHANG-SHI-CHANG

Were you able to solve this?

iiHarry avatar Sep 05 '21 13:09 iiHarry

Traceback (most recent call last): File "main.py", line 110, in graphList[i] = triangulateGraph(graphList[i],imageSize) File "/content/drive/SFM/utils/graph.py", line 84, in triangulateGraph x[cnt,:] = newGraph.obsVal[newGraph.ObsIdx[i][ind],:] IndexError: only integers, slices (:), ellipsis (...), numpy.newaxis (None) and integer or boolean arrays are valid indices

Traceback (most recent call last): File "main.py", line 110, in graphList[i] = triangulateGraph(graphList[i],imageSize) File "/content/drive/SFM/utils/graph.py", line 84, in triangulateGraph x[cnt,:] = newGraph.obsVal[newGraph.ObsIdx[i][ind],:] IndexError: only integers, slices (:), ellipsis (...), numpy.newaxis (None) and integer or boolean arrays are valid indices

I also have the same error. Have you solved it?

iiHarry avatar Sep 05 '21 14:09 iiHarry