question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

IndexError in saliency.py for rbd

See original GitHub issue

Running demo.py, get ‘rbd’ error in saliency.py:

File “saliency.py”, line 62, in <listcomp> edges = [[vertices[x%num_vertices], vertices[x/num_vertices]] for x in edges] IndexError: only integers, slices (:), ellipsis (...), numpy.newaxis (None) and integer or boolean arrays are valid indices

Both ft and mdb run without problems.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:5
  • Comments:9

github_iconTop GitHub Comments

5reactions
Eracrocommented, May 18, 2018

Hola !

I think it’s just a little type problem due to the division, you can correct it by casting the result before using it as an index, just replace the line 61 in saliency.py by :

edges = [[vertices[x%num_vertices],vertices[int(x/num_vertices)]] for x in edges]

and it should be ok

5reactions
RoseLiicommented, Nov 8, 2017

please help me ImportError: No module named pyimgsaliency

Read more comments on GitHub >

github_iconTop Results From Across the Web

saliency - PyPI
The repository provides an implementation of Performance Information Curve (PIC) - a human independent metric for evaluating the quality of saliency methods ( ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found