diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 540b261b..32f269da 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,7 +38,6 @@ jobs: fail-fast: false matrix: python-version: - - "3.9" - "3.10" - "3.11" - "3.12" @@ -64,7 +63,6 @@ jobs: fail-fast: false matrix: python-version: - - "3.9" - "3.10" - "3.11" - "3.12" diff --git a/pyproject.toml b/pyproject.toml index b8ad11ea..173d8992 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,7 +19,7 @@ maintainers = [ authors = [ { name = "Jim Pivarski, Henry Schreiner, Eduardo Rodrigues", email = "eduardo.rodrigues@cern.ch" }, ] -requires-python = ">=3.9" +requires-python = ">=3.10" classifiers = [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", @@ -27,7 +27,6 @@ classifiers = [ "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", @@ -49,7 +48,7 @@ dependencies = [ [project.optional-dependencies] awkward = ["awkward>=2"] -numba = ["numba>=0.57; python_version<'3.14'"] +numba = ["numba>=0.62; python_version<'3.14'"] sympy = ["sympy"] [project.urls] @@ -173,7 +172,7 @@ isort.required-imports = [ ] [tool.pylint] -master.py-version = "3.9" +master.py-version = "3.10" reports.output-format = "colorized" similarities.ignore-imports = "yes" master.jobs = "0" @@ -262,7 +261,7 @@ filterwarnings = [ files = [ "src/vector", ] -python_version = "3.9" +python_version = "3.10" strict = true warn_return_any = false enable_error_code = [ diff --git a/src/vector/backends/_numba_object.py b/src/vector/backends/_numba_object.py index 37b79f4b..3ec45db4 100644 --- a/src/vector/backends/_numba_object.py +++ b/src/vector/backends/_numba_object.py @@ -50,36 +50,6 @@ _coord_object_type, ) - -@numba.extending.overload(numpy.nan_to_num) # FIXME: This needs to go into Numba! -def nan_to_num(x, copy=True, nan=0.0, posinf=None, neginf=None): - if isinstance(x, numba.types.Array): - - def nan_to_num_impl(x, copy=True, nan=0.0, posinf=None, neginf=None): - out = numpy.copy(x).reshape(-1) if copy else x.reshape(-1) - for i in range(len(out)): - if numpy.isnan(out[i]): - out[i] = nan - if posinf is not None and numpy.isinf(out[i]) and out[i] > 0: - out[i] = posinf - if neginf is not None and numpy.isinf(out[i]) and out[i] < 0: - out[i] = neginf - return out.reshape(x.shape) - - else: - - def nan_to_num_impl(x, copy=True, nan=0.0, posinf=None, neginf=None): - if numpy.isnan(x): - return nan - if posinf is not None and numpy.isinf(x) and x > 0: - return posinf - if neginf is not None and numpy.isinf(x) and x < 0: - return neginf - return x - - return nan_to_num_impl - - # Since CoordinateObjects are NamedTuples, we get their types wrapped for free. diff --git a/src/vector/backends/awkward.py b/src/vector/backends/awkward.py index 6e049e83..44e392a0 100644 --- a/src/vector/backends/awkward.py +++ b/src/vector/backends/awkward.py @@ -83,7 +83,7 @@ # Throws an error if awkward is too old vector._import_awkward() -ArrayOrRecord = typing.TypeVar("ArrayOrRecord", bound=typing.Union[ak.Array, ak.Record]) +ArrayOrRecord = typing.TypeVar("ArrayOrRecord", bound=ak.Array | ak.Record) Array = typing.TypeVar("Array") behavior: typing.Any = {}