@numba.njit
def corners_2d_jit(dims, origin=0.5):
    ndim = 2
    corners_norm = np.array([[0, 0], [0, 1], [1, 1], [1, 0]], dtype=dims.dtype)
    corners_norm = (corners_norm - np.array(origin, dtype=dims.dtype))
    corners = (dims.reshape(((- 1), 1, ndim)) * corners_norm.reshape((1, (2 ** ndim), ndim)))
    return corners
@numba.njit
def corners_2d_jit(dims, origin=0.5):
    ndim = 2
    corners_norm = np.array([[0, 0], [0, 1], [1, 1], [1, 0]], dtype=dims.dtype)
    corners_norm = (corners_norm - np.array(origin, dtype=dims.dtype))
    corners = (dims.reshape(((- 1), 1, ndim)) * corners_norm.reshape((1, (2 ** ndim), ndim)))
    return corners