The code you've shown us is fine. You have an error somewhere else, probably reusing the x
or d
variables or forgetting function call parentheses.
↧
Answer by user2357112 for Python: using dictionary value as an index into numpy array
↧