@numba.jit(nopython=True)
def corner_to_surfaces_3d_jit(corners):
    'convert 3d box corners from corner function above\n    to surfaces that normal vectors all direct to internal.\n\n    Args:\n        corners (float array, [N, 8, 3]): 3d box corners.\n    Returns:\n        surfaces (float array, [N, 6, 4, 3]):\n    '
    num_boxes = corners.shape[0]
    surfaces = np.zeros((num_boxes, 6, 4, 3), dtype=corners.dtype)
    corner_idxes = np.array([0, 1, 2, 3, 7, 6, 5, 4, 0, 3, 7, 4, 1, 5, 6, 2, 0, 4, 5, 1, 3, 2, 6, 7]).reshape(6, 4)
    for i in range(num_boxes):
        for j in range(6):
            for k in range(4):
                surfaces[(i, j, k)] = corners[(i, corner_idxes[(j, k)])]
    return surfaces
convert 3d box corners from corner function above
to surfaces that normal vectors all direct to internal.

Args:
    corners (float array, [N, 8, 3]): 3d box corners.
Returns:
    surfaces (float array, [N, 6, 4, 3]):
@numba.jit(nopython=True)
def corner_to_surfaces_3d_jit(corners):
    'convert 3d box corners from corner function above\n    to surfaces that normal vectors all direct to internal.\n\n    Args:\n        corners (float array, [N, 8, 3]): 3d box corners.\n    Returns:\n        surfaces (float array, [N, 6, 4, 3]):\n    '
    num_boxes = corners.shape[0]
    surfaces = np.zeros((num_boxes, 6, 4, 3), dtype=corners.dtype)
    corner_idxes = np.array([0, 1, 2, 3, 7, 6, 5, 4, 0, 3, 7, 4, 1, 5, 6, 2, 0, 4, 5, 1, 3, 2, 6, 7]).reshape(6, 4)
    for i in range(num_boxes):
        for j in range(6):
            for k in range(4):
                surfaces[(i, j, k)] = corners[(i, corner_idxes[(j, k)])]
    return surfaces