diff --git a/elementary/utils/json_utils.py b/elementary/utils/json_utils.py index d5a885a47..d0e3ee3c1 100644 --- a/elementary/utils/json_utils.py +++ b/elementary/utils/json_utils.py @@ -1,8 +1,7 @@ import json +import math from typing import Any, List, Optional, Union -import numpy as np - def try_load_json(value: Optional[Union[str, dict, list]]): if value is None: @@ -83,9 +82,9 @@ def append_prefix_if_missing(string: str, prefix: str) -> str: def inf_and_nan_to_str(obj) -> Any: """Replaces occurrences of float("nan") for float("infinity") in the given dict object.""" if isinstance(obj, float): - if np.isinf(obj): + if math.isinf(obj): return "Infinity" if obj > 0 else "-Infinity" - elif np.isnan(obj): + elif math.isnan(obj): return "NaN" else: return obj diff --git a/pyproject.toml b/pyproject.toml index 5e08c4985..f7721cab0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,7 +13,7 @@ documentation = "https://docs.elementary-data.com" packages = [{include = "elementary"}] [tool.poetry.dependencies] -# matches the versions supported by dbt as of v1.9, which are probably due to the limits of numpy 1.26.x +# matches the versions supported by dbt as of v1.9, which are probably due to the limits of numpy 1.26.x(which was removed) python = ">=3.9,<3.13" click = ">=7.0,<9.0" dbt-core = ">=0.20,<2.0.0" @@ -32,7 +32,6 @@ networkx = ">=2.3,<3" packaging = ">=20.9" azure-storage-blob = ">=12.11.0" pymsteams = ">=0.2.2,<1.0.0" -numpy = "<2.0.0" tabulate = ">= 0.9.0" pytz = ">= 2025.1"