Skip to content

Commit 342869f

Browse files
committed
lint
1 parent f58dd4e commit 342869f

File tree

4 files changed

+4
-10
lines changed

4 files changed

+4
-10
lines changed

pixi.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/array_api_extra/_lib/_compat.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,17 @@
1212
is_jax_namespace,
1313
is_pydata_sparse_namespace,
1414
is_torch_namespace,
15-
is_jax_namespace,
1615
is_writeable_array,
1716
size,
1817
)
1918
except ImportError:
2019
from array_api_compat import ( # pyright: ignore[reportMissingTypeStubs]
2120
array_namespace,
2221
device,
23-
is_dask_namespace,
2422
is_cupy_namespace,
23+
is_dask_namespace,
2524
is_jax_array,
2625
is_jax_namespace,
27-
is_jax_namespace,
2826
is_pydata_sparse_namespace,
2927
is_torch_namespace,
3028
is_writeable_array,
@@ -40,7 +38,6 @@
4038
"is_jax_namespace",
4139
"is_pydata_sparse_namespace",
4240
"is_torch_namespace",
43-
"is_jax_namespace",
4441
"is_writeable_array",
4542
"size",
4643
]

src/array_api_extra/_lib/_compat.pyi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ def is_cupy_namespace(x: object, /) -> bool: ...
2222
def is_dask_namespace(xp: ModuleType, /) -> bool: ...
2323
def is_jax_namespace(xp: ModuleType, /) -> bool: ...
2424
def is_jax_array(x: object, /) -> bool: ...
25-
def is_jax_namespace(x: object, /) -> bool: ...
2625
def is_pydata_sparse_namespace(x: object, /) -> bool: ...
2726
def is_torch_namespace(x: object, /) -> bool: ...
2827
def is_writeable_array(x: object, /) -> bool: ...

vendor_tests/test_vendor.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,20 @@ def test_vendor_compat():
1212
is_jax_namespace,
1313
is_pydata_sparse_namespace,
1414
is_torch_namespace,
15-
is_jax_namespace,
1615
is_writeable_array,
1716
size,
1817
)
1918

2019
x = xp.asarray([1, 2, 3])
2120
assert array_namespace(x) is xp
2221
device(x)
22+
assert not is_cupy_namespace(xp)
2323
assert not is_dask_namespace(xp)
24-
assert not is_jax_namespace(xp)
2524
assert not is_jax_array(x)
26-
assert is_writeable_array(x)
27-
assert not is_cupy_namespace(xp)
2825
assert not is_jax_namespace(xp)
2926
assert not is_pydata_sparse_namespace(xp)
3027
assert not is_torch_namespace(xp)
28+
assert is_writeable_array(x)
3129
assert size(x) == 3
3230

3331

0 commit comments

Comments
 (0)