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 __init__(self, container):
		self.x = container.x+randint(1, floor(container.w/3))
		self.y = container.y+randint(1, floor(container.h/3))
		self.w = container.w-(self.x-container.x)
		self.h = container.h-(self.y-container.y)
		self.w -= randint(0,floor(self.w/3))
		self.h -= randint(0,floor(self.w/3))
		self.environment = int(min(4,10*(container.distance_from_center/MAP_WIDTH)+random()*2-1))
		roll = random()*0.9+(2*container.distance_from_center/MAP_WIDTH)*0.1
		self.biome = next(n for n,b in enumerate(self.biomes_CDF) if roll<b)