Skip to content

Commit

Permalink
Clarify that grad requires arguments to be differentiated to be of …
Browse files Browse the repository at this point in the history
…inexact type.
  • Loading branch information
hawkinsp committed Apr 14, 2020
1 parent 1ac80d7 commit 9c8efef
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion jax/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,9 @@ def grad(fun: Callable, argnums: Union[int, Sequence[int]] = 0,
Args:
fun: Function to be differentiated. Its arguments at positions specified by
``argnums`` should be arrays, scalars, or standard Python containers. It
``argnums`` should be arrays, scalars, or standard Python containers.
Argument arrays in the positions specified by ``argnums`` must be of
inexact (i.e., floating-point or complex) type. It
should return a scalar (which includes arrays with shape ``()`` but not
arrays with shape ``(1,)`` etc.)
argnums: Optional, integer or sequence of integers. Specifies which
Expand Down

0 comments on commit 9c8efef

Please sign in to comment.