diff --git a/src/quaxed/experimental/_arrayish/binary.py b/src/quaxed/experimental/_arrayish/binary.py index aedefae..73621c4 100644 --- a/src/quaxed/experimental/_arrayish/binary.py +++ b/src/quaxed/experimental/_arrayish/binary.py @@ -104,7 +104,10 @@ class LaxAddMixin(Generic[T, R]): """ def __add__(self, other: T) -> R: - return qlax.add(self, other) + try: + return qlax.add(self, other) + except Exception: # noqa: BLE001 + return NotImplemented class NumpyAddMixin(Generic[T, R]): @@ -126,7 +129,10 @@ class NumpyAddMixin(Generic[T, R]): """ def __add__(self, other: T) -> R: - return qnp.add(self, other) + try: + return qnp.add(self, other) + except Exception: # noqa: BLE001 + return NotImplemented # ------------------------------------- @@ -152,7 +158,10 @@ class LaxRAddMixin(Generic[T, R]): """ def __radd__(self, other: T) -> R: - return qlax.add(other, self) + try: + return qlax.add(other, self) + except Exception: # noqa: BLE001 + return NotImplemented class NumpyRAddMixin(Generic[T, R]): @@ -174,7 +183,10 @@ class NumpyRAddMixin(Generic[T, R]): """ def __radd__(self, other: T) -> R: - return qnp.add(other, self) + try: + return qnp.add(other, self) + except Exception: # noqa: BLE001 + return NotImplemented # ------------------------------------- diff --git a/uv.lock b/uv.lock index 792267d..cd0681a 100644 --- a/uv.lock +++ b/uv.lock @@ -1242,7 +1242,6 @@ wheels = [ [[package]] name = "quaxed" -version = "0.8.1.dev0+gf70fa86.d20250121" source = { editable = "." } dependencies = [ { name = "jax" },