diff --git a/apis/python/tests/test_basic_anndata_io.py b/apis/python/tests/test_basic_anndata_io.py index 7563f714ae..ae3d7d9f96 100644 --- a/apis/python/tests/test_basic_anndata_io.py +++ b/apis/python/tests/test_basic_anndata_io.py @@ -734,7 +734,7 @@ def test_null_obs(conftest_pbmc_small, tmp_path: Path): seed = 42 # Create column of all null values conftest_pbmc_small.obs["empty_categorical_all"] = pd.Categorical( - [np.NaN] * conftest_pbmc_small.n_obs, + [np.nan] * conftest_pbmc_small.n_obs, dtype=pd.CategoricalDtype(categories=[], ordered=False), ) conftest_pbmc_small.obs["empty_extension_all"] = pd.Series( @@ -744,7 +744,7 @@ def test_null_obs(conftest_pbmc_small, tmp_path: Path): rng = np.random.RandomState(seed) conftest_pbmc_small.obs["empty_categorical_partial"] = rng.choice( - (np.NaN, 1.0), conftest_pbmc_small.n_obs, True + (np.nan, 1.0), conftest_pbmc_small.n_obs, True ) conftest_pbmc_small.obs["empty_extension_partial"] = pd.Series( [1] * conftest_pbmc_small.n_obs + [np.nan], dtype=pd.Int64Dtype() diff --git a/apis/python/tests/test_dataframe.py b/apis/python/tests/test_dataframe.py index 7882993792..16e4b1c225 100644 --- a/apis/python/tests/test_dataframe.py +++ b/apis/python/tests/test_dataframe.py @@ -1218,7 +1218,7 @@ def test_extend_enumerations(tmp_path): np.array([0, 1.1, 2.1, 0, 1.1, 2.1], dtype=np.float64), dtype="category" ), "float64_w_non_finite": pd.Series( - np.array([0, 1.1, 2.1, 0, np.Inf, np.NINF], dtype=np.float64), + np.array([0, 1.1, 2.1, 0, np.inf, np.NINF], dtype=np.float64), dtype="category", ), "str_ordered": pd.Series( diff --git a/apis/python/tests/test_regression.py b/apis/python/tests/test_regression.py index 096df8f41f..300a7bda20 100644 --- a/apis/python/tests/test_regression.py +++ b/apis/python/tests/test_regression.py @@ -10,7 +10,7 @@ def test_nd_dense_non_contiguous_write(tmp_path): """Test regression dected in GitHub Issue #2537""" # Create data. data = ( - np.arange(np.product(24), dtype=np.uint8) + np.arange(np.prod(24), dtype=np.uint8) .reshape((4, 3, 2)) .transpose((2, 0, 1)) )