Skip to content

Commit

Permalink
Add missing numpy test
Browse files Browse the repository at this point in the history
  • Loading branch information
fferflo committed Apr 23, 2024
1 parent bb7ed87 commit 4af566a
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,22 @@ def op3(*args, **kwargs):
return op3



# numpy is always available
import numpy as np

backend = einx.backend.numpy.create()

test = types.SimpleNamespace(
full=lambda shape, value=0.0, dtype="float32": np.full(shape, value, dtype=dtype),
to_tensor=np.asarray,
to_numpy=np.asarray,
)

tests.append((einx, backend, test))



if importlib.util.find_spec("jax"):
import jax
import jax.numpy as jnp
Expand Down

0 comments on commit 4af566a

Please sign in to comment.