Skip to content

Commit

Permalink
Merge pull request #23940 from jakevdp:jacobian-doc
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 679203936
  • Loading branch information
Google-ML-Automation committed Sep 26, 2024
2 parents 96cf2b8 + cf51ee7 commit 6f7ad64
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/jax.rst
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ Automatic differentiation

grad
value_and_grad
jacobian
jacfwd
jacrev
hessian
Expand Down
8 changes: 7 additions & 1 deletion jax/_src/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,13 @@ def jacfun(*args, **kwargs):
return jac_tree, aux

return jacfun
jacobian = jacrev


def jacobian(fun: Callable, argnums: int | Sequence[int] = 0,
has_aux: bool = False, holomorphic: bool = False, allow_int: bool = False) -> Callable:
"""Alias of :func:`jax.jacrev`."""
return jacrev(fun, argnums=argnums, has_aux=has_aux, holomorphic=holomorphic, allow_int=allow_int)


_check_input_dtype_jacrev = partial(_check_input_dtype_revderiv, "jacrev")
_check_output_dtype_jacrev = partial(_check_output_dtype_revderiv, "jacrev")
Expand Down

0 comments on commit 6f7ad64

Please sign in to comment.