Indices cannot be specified as `np.int32` or `np.int64`
Closed this issue · 1 comments
erykoff commented
The following sample code should work but doesn't:
import healsparse
import numpy as np
test = healsparse.HealSparseMap.make_empty(32, 4096, np.float32)
# This works
print(test[100])
# This works
inds = np.arange(100, 200)
print(test[inds][0])
# This doesn't work
ind = inds[0]
print(test[ind])
This raises: IndexError: Illegal index type (<class 'numpy.int64'>) for __getitem__ in HealSparseMap.
fjaviersanchez commented
Solved by #91