def test_negative_scalar_index(adata, index: int, obs: bool):
    pos_index = index + (adata.n_obs if obs else adata.n_vars)

    if obs:
        adata_pos_subset = adata[pos_index]
        adata_neg_subset = adata[index]
    else:
        adata_pos_subset = adata[:, pos_index]
        adata_neg_subset = adata[:, index]

    np.testing.assert_array_equal(
        adata_pos_subset.obs_names, adata_neg_subset.obs_names
    )
    np.testing.assert_array_equal(
        adata_pos_subset.var_names, adata_neg_subset.var_names
    )
def draw_axis(img, charuco_corners, charuco_ids, board):
    vecs = np.load("./calib.npz")  # I already calibrated the camera
    mtx, dist, _, _ = [vecs[i] for i in ('mtx', 'dist', 'rvecs', 'tvecs')]
    ret, rvec, tvec = cv2.aruco.estimatePoseCharucoBoard(
        charuco_corners, charuco_ids, board, mtx, dist)
    if ret is not None and ret is True:
        cv2.aruco.drawAxis(img, mtx, dist, rvec, tvec, 0.1)