Skip to content

Commit

Permalink
Merge pull request #68 from mfastudillo/main
Browse files Browse the repository at this point in the history
replace np.NaN by np.nan
  • Loading branch information
cmutel authored Jul 2, 2024
2 parents 18eab72 + ad09395 commit f047c16
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions bw_processing/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
)
Expand Down
4 changes: 2 additions & 2 deletions tests/datapackage.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand Down
12 changes: 6 additions & 6 deletions tests/fixtures/basic_arrays.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)

0 comments on commit f047c16

Please sign in to comment.