diff --git a/bw_processing/utils.py b/bw_processing/utils.py index d56059c..2ca988c 100644 --- a/bw_processing/utils.py +++ b/bw_processing/utils.py @@ -58,10 +58,10 @@ def dictionary_formatter(row: dict) -> tuple: row["amount"], as_uncertainty_type(row), row.get("loc", row["amount"]), - row.get("scale", np.NaN), - row.get("shape", np.NaN), - row.get("minimum", np.NaN), - row.get("maximum", np.NaN), + row.get("scale", np.nan), + row.get("shape", np.nan), + row.get("minimum", np.nan), + row.get("maximum", np.nan), row.get("negative", False), row.get("flip", False), ) diff --git a/tests/datapackage.py b/tests/datapackage.py index 89deace..6d80c75 100644 --- a/tests/datapackage.py +++ b/tests/datapackage.py @@ -289,8 +289,8 @@ def test_add_persistent_vector_distributions_shapemismatch(): dp = create_datapackage() distributions_array = np.array( [ - (3, 1.3, 2.5, np.NaN, np.NaN, np.NaN, False), - (0, 1.3, 2.5, np.NaN, np.NaN, np.NaN, False), + (3, 1.3, 2.5, np.nan, np.nan, np.nan, False), + (0, 1.3, 2.5, np.nan, np.nan, np.nan, False), ], dtype=UNCERTAINTY_DTYPE, ) diff --git a/tests/fixtures/basic_arrays.py b/tests/fixtures/basic_arrays.py index bd28dd8..9bc83ec 100644 --- a/tests/fixtures/basic_arrays.py +++ b/tests/fixtures/basic_arrays.py @@ -24,19 +24,19 @@ def flip_vector(): def distributions_vector(): return np.array( [ - (0, 1, np.NaN, np.NaN, np.NaN, np.NaN, False), - (0, 1, np.NaN, np.NaN, np.NaN, np.NaN, False), - (0, 1, np.NaN, np.NaN, np.NaN, np.NaN, False), + (0, 1, np.nan, np.nan, np.nan, np.nan, False), + (0, 1, np.nan, np.nan, np.nan, np.nan, False), + (0, 1, np.nan, np.nan, np.nan, np.nan, False), ( 5, 237, - np.NaN, - np.NaN, + np.nan, + np.nan, 200, 300, False, ), # triangular uncertainty from 200 to 300 - (5, 2.5, np.NaN, np.NaN, 2, 3, False), # triangular uncertainty from 2 to 3 + (5, 2.5, np.nan, np.nan, 2, 3, False), # triangular uncertainty from 2 to 3 ], dtype=UNCERTAINTY_DTYPE, )