File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ defmodule Nx.Defn.Composite do
33 Functions to deal with composite data types.
44
55 Composite data-types are traversed according to `Nx.Container`.
6- If a regular tensor is given, it is individually traversed.
6+ If a regular tensor is given, it is individually traversed.
77 Numerical values, such as integers, floats, and complex numbers
88 are not normalized before hand. Use `Nx.to_tensor/1` to do so.
99
@@ -42,8 +42,10 @@ defmodule Nx.Defn.Composite do
4242 { left , right } =
4343 case Nx.LazyContainer . impl_for ( left ) do
4444 Nx.LazyContainer.Any ->
45- left = Nx.Container . reduce ( left , [ ] , & [ & 1 | & 2 ] )
46- right = Nx.Container . reduce ( right , [ ] , & [ & 1 | & 2 ] )
45+ # Avoid type system warning because, when compiling Nx itself,
46+ # the lazy containers are the same as containers.
47+ left = Nx.Container . reduce ( Function . identity ( left ) , [ ] , & [ & 1 | & 2 ] )
48+ right = Nx.Container . reduce ( Function . identity ( right ) , [ ] , & [ & 1 | & 2 ] )
4749 { left , right }
4850
4951 impl ->
You can’t perform that action at this time.
0 commit comments