Skip to content

Commit 2829044

Browse files
committed
No way to create empty shape
1 parent 027b60a commit 2829044

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

tests/test_funcs.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import hypothesis.extra.numpy as npst
88
import numpy as np
99
import pytest
10-
from array_api_compat import is_jax_namespace
1110
from hypothesis import given
1211
from hypothesis import strategies as st
1312

@@ -471,16 +470,6 @@ def test_dims_and_classes(self, xp: ModuleType, n_dim: int, num_classes: int):
471470
i = tuple(i_list)
472471
assert float(y[(*i, j)]) == (int(x[i]) == j)
473472

474-
def test_empty_shape(self, xp: ModuleType):
475-
if not is_jax_namespace(xp):
476-
pytest.skip("backend does not support abstract arrays")
477-
import jax
478-
import jax.numpy as jnp
479-
480-
abstract_input = jax.ShapeDtypeStruct(shape=(None, 784), dtype=jnp.float32)
481-
with pytest.raises(TypeError):
482-
_ = one_hot(abstract_input, 3)
483-
484473
def test_basic(self, xp: ModuleType):
485474
actual = one_hot(xp.asarray([0, 1, 2]), 3)
486475
expected = xp.asarray([[1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0]])

0 commit comments

Comments
 (0)