WIP: More specific datatypes in _refine, trying to solve numba-only test failure.