-
Notifications
You must be signed in to change notification settings - Fork 62
Description
Currently, we don't compare the dtype of objects being passed to the crand module, which is the conditional randomisation engine for many of the statistics in esda. This is important because, as it turns out, numba requires the same dtype for most operations, and this is very strict (e.g. float32 and float64 will not be compatible). This means that, if you're running a LISA and pass a W made up of float64 values and a pandas.Series with float32 values, Moran_Local will return an error because numba cannot get the product of the two.
One potential solution is adding a checker either a) at initialisation of all the statistics in esda that rely on crand, or b) within crand before any calculations happen (perhaps here). An open question is what that checker would do: 1) modify in place? 2) create a copy? 3) return an human-readable error?