Skip to content

Commit

Permalink
Merge pull request #25686 from Mikcl:docs/working-with-pytrees-format…
Browse files Browse the repository at this point in the history
…ting

PiperOrigin-RevId: 711448394
  • Loading branch information
Google-ML-Automation committed Jan 2, 2025
2 parents 726950b + 008c25a commit 800f903
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/working-with-pytrees.md
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ This section covers some of the most common patterns with JAX pytrees.

### Transposing pytrees with `jax.tree.map` and `jax.tree.transpose`

To transpose a pytree (turn a list of trees into a tree of lists), JAX has two functions: {func} `jax.tree.map` (more basic) and {func}`jax.tree.transpose` (more flexible, complex and verbose).
To transpose a pytree (turn a list of trees into a tree of lists), JAX has two functions: {func}`jax.tree.map` (more basic) and {func}`jax.tree.transpose` (more flexible, complex and verbose).

**Option 1:** Use {func}`jax.tree.map`. Here's an example:

Expand Down

0 comments on commit 800f903

Please sign in to comment.