Skip to content

Commit c424c3c

Browse files
jfesereb8680
andauthored
Add jax.numpy.linalg (#316)
* add jax.numpy.linalg * fix relative import --------- Co-authored-by: Eli <eli@elibingham.com>
1 parent e284557 commit c424c3c

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import jax.numpy
44

5-
from ._handlers import _register_jax_op, _register_jax_op_no_partial_eval
5+
from .._handlers import _register_jax_op, _register_jax_op_no_partial_eval
66

77
_no_overload = ["array", "asarray"]
88

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
from typing import TYPE_CHECKING
2+
3+
import jax.numpy.linalg
4+
5+
from effectful.handlers.jax._handlers import _register_jax_op
6+
7+
for name, op in jax.numpy.linalg.__dict__.items():
8+
if callable(op):
9+
globals()[name] = _register_jax_op(op)
10+
11+
# Tell mypy about our wrapped functions.
12+
if TYPE_CHECKING:
13+
from jax.numpy.linalg import * # noqa: F403

0 commit comments

Comments
 (0)