Skip to content

Commit

Permalink
Improve documentation for jax.jacobian
Browse files Browse the repository at this point in the history
  • Loading branch information
jakevdp committed Sep 26, 2024
1 parent 5d4cae0 commit cf51ee7
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 cf51ee7

Please sign in to comment.