Closed sba5827 closed 3 years ago
Thanks @sba5827 -- in our 2.0.0 release slated for next week, this issue will be fixed. FYI the fix is simply:
# Check types
if not isinstance(inds, np.ndarray):
inds = sc.promotetoarray(inds)
if inds.dtype != np.int64: # This is int64 since indices often come from cv.true(), which returns int64
inds = np.array(inds, dtype=np.int64)
Fixed in version 2.0 (now released)
https://github.com/InstituteforDiseaseModeling/covasim/blob/a55a849b2a1666e866c552356020a85fe7bd521f/covasim/base.py#L1235-L1238
cvu.find_contacts expects an int64 array, but the if statement does not ensure that the datatype is correct