-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
Labels
arrays[a, r, r, a, y, s][a, r, r, a, y, s]
Description
An array of arrays is a valid vector space.
Even an array of arrays of different sizes.
This is why we define transpose
, adjoint
, dot
and +
recursively
However we do not do the same for zero
, which is a fundermental vector space operation.
julia> zero([2,2])
2-element Array{Int64,1}:
0
0
julia> zero([[2,2], [3,3,3]])
ERROR: MethodError: no method matching zero(::Type{Array{Int64,1}})
This is a problem for AD purposes.
Types that are used to represent a tangent/cotangent need to have the basic vector space operations defined on them.
So if we want to say that the cotangent of an array of arrays of numbers is an an array of arrays of numbers then we should really have zero
on it
simeonschaub, oscardssmith, DilumAluthge, nickrobinson251, Moelf and 9 more
Metadata
Metadata
Assignees
Labels
arrays[a, r, r, a, y, s][a, r, r, a, y, s]