Skip to content
Merged
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
12 changes: 5 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ repos:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
- id: ruff-format
types_or: [markdown, rst]
require_serial: true
entry: doccmd --language python --no-pad-file --command "ruff format"
additional_dependencies: ["doccmd"]
- repo: https://github.com/codespell-project/codespell
rev: v2.4.1
hooks:
Expand All @@ -55,10 +60,3 @@ repos:
hooks:
- id: mypy
additional_dependencies: []
- repo: https://github.com/adamtheturtle/doccmd-pre-commit
rev: v2025.4.8
hooks:
- id: doccmd
args:
["--language", "python", "--no-pad-file", "--command", "ruff format"]
additional_dependencies: ["ruff"]
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ classifiers = [

dependencies = [
"array-api-compat>=1.11.2",
"cm-time>=0.1.2",
"frozendict>=2.4.6",
]
urls."Bug Tracker" = "https://github.com/34j/array-api-jit/issues"
Expand All @@ -36,6 +35,7 @@ urls.repository = "https://github.com/34j/array-api-jit"

[dependency-groups]
dev = [
"cm-time>=0.1.2",
"jax>=0.4.30",
"numba>=0.60.0",
"pytest>=8,<9",
Expand Down
6 changes: 2 additions & 4 deletions src/array_api_jit/_main.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# https://github.com/search?q=gumerov+translation+language%3APython&type=code&l=Python
import importlib.util
import warnings
from collections.abc import Callable, Mapping, Sequence
Expand All @@ -14,7 +13,6 @@
is_numpy_namespace,
is_torch_namespace,
)
from frozendict import frozendict

if importlib.util.find_spec("numba"):
import numpy as np
Expand Down Expand Up @@ -123,8 +121,8 @@ def jit(
"""

def new_decorator(f: Callable[Pinner, Tinner]) -> Callable[Pinner, Tinner]:
decorator_args_ = frozendict(decorator_args or {})
decorator_kwargs_ = frozendict(decorator_kwargs or {})
decorator_args_ = decorator_args or {}
decorator_kwargs_ = decorator_kwargs or {}
decorator_ = decorator or {}

@cache
Expand Down
2 changes: 1 addition & 1 deletion tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def test_jit(xp: Any) -> None:
print(xp.__name__, name)
for i in range(20):
with timer() as timer_:
x = xp.arange(1000000, dtype=xp.float32)
x = xp.arange(1000000, dtype=xp.float32) / 1000000
p = func(x, 10)
assert p.shape == (1000000, 10)
t[name] = timer_.elapsed
Expand Down
4 changes: 2 additions & 2 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading