Skip to content

Commit

Permalink
Don't import numba on Python 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
Saransh-cpp committed Jan 29, 2024
1 parent 6ec6cb0 commit 3b2a1a2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/vector/backends/_numba.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@

from __future__ import annotations

import sys
import types
import typing

import numba
if sys.version_info < (3, 12):
import numba

import vector._compute.lorentz
import vector._compute.planar
import vector._compute.spatial

__doctest_requires__ = {("*"): ["numba"]}

names_and_modules = [
("planar", vector._compute.planar),
("spatial", vector._compute.spatial),
Expand Down
7 changes: 4 additions & 3 deletions src/vector/backends/_numba_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@
from __future__ import annotations

import operator
import sys

if sys.version_info < (3, 12):
import numba

import numba
import numpy

import vector
Expand Down Expand Up @@ -50,8 +53,6 @@
_coord_object_type,
)

__doctest_requires__ = {("*"): ["numba"]}


@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):
Expand Down

0 comments on commit 3b2a1a2

Please sign in to comment.