Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ jobs:
fail-fast: false
matrix:
python-version:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
Expand All @@ -64,7 +63,6 @@ jobs:
fail-fast: false
matrix:
python-version:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
Expand Down
9 changes: 4 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,14 @@ maintainers = [
authors = [
{ name = "Jim Pivarski, Henry Schreiner, Eduardo Rodrigues", email = "[email protected]" },
]
requires-python = ">=3.9"
requires-python = ">=3.10"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"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",
Expand All @@ -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]
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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 = [
Expand Down
30 changes: 0 additions & 30 deletions src/vector/backends/_numba_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.


Expand Down
2 changes: 1 addition & 1 deletion src/vector/backends/awkward.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {}
Expand Down