Quantcast
Channel: Python: using dictionary value as an index into numpy array - Stack Overflow
Browsing latest articles
Browse All 2 View Live

Answer by user2357112 for Python: using dictionary value as an index into...

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.

View Article


Python: using dictionary value as an index into numpy array

I have a 3 dimensional numpy array, for example:x = np.zeros((10, 10, 10))Now, I have a dictionary as follows, which keeps a 1-D to 3-D mapping as follows:d = {}d[0] = (1, 1, 1)Now, I want to access...

View Article

Browsing latest articles
Browse All 2 View Live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>