From ec461786832538cadb1af01bf41fa023621252fb Mon Sep 17 00:00:00 2001 From: HydrogenSulfate <490868991@qq.com> Date: Tue, 26 Nov 2024 22:26:24 +0800 Subject: [PATCH] add suffix for test_python_scalars and add paddle index-url in rqeuirements --- requirements-dev.txt | 2 +- tests/test_array_namespace.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index ae41a25e..7ad022d7 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -4,6 +4,6 @@ jax[cpu] numpy pytest torch -paddlepaddle +paddlepaddle -i https://www.paddlepaddle.org.cn/packages/nightly/cpu/ sparse >=0.15.1 ndonnx diff --git a/tests/test_array_namespace.py b/tests/test_array_namespace.py index e9e7458f..4076c74c 100644 --- a/tests/test_array_namespace.py +++ b/tests/test_array_namespace.py @@ -122,7 +122,7 @@ def test_get_namespace(): # Backwards compatible wrapper assert array_api_compat.get_namespace is array_api_compat.array_namespace -def test_python_scalars(): +def test_python_scalars_torch(): a = torch.asarray([1, 2]) xp = import_("torch", wrapper=True) @@ -138,7 +138,7 @@ def test_python_scalars(): assert array_namespace(a, True) == xp assert array_namespace(a, None) == xp -def test_python_scalars(): +def test_python_scalars_paddle(): a = paddle.to_tensor([1, 2]) xp = import_("paddle", wrapper=True)