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 connectWithSsh(self):
        self._debugLog("Establishing connection to " + self.host)
        self._connection = self.pexpect.spawn(
                'ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no %s@%s -p %d' % 
                (self._loginUser.username, self.host, self._port))
        if self._connection is None:
            raise Exception("Unable to connect via SSH perhaps wrong IP!")
        self._secure = True
        self._setupLog()
        self._loginUser.commandLine(self)
        self.modeList = [self._loginUser]