You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
LinearAlgebra implements broadcasting for transposed/adjoint rows by specializing the broadcast method itself for a handful of combinations of types instead of working within the Broadcast system directly. This leads to the following behaviors:
Implementing the style will allow us to more consistently do what we want here — preserve the transposed row — but of course it'll be a minor change in the returned array types. We'll need to decide if, e.g., identity.(sparse(1:3)') should be a sparse matrix or an adjoint sparse vector.
(This is marked with a TODO in the code but I cannot find a corresponding issue.)
The text was updated successfully, but these errors were encountered:
One of the challenging aspects is that the broadcast style of parent should be honoured as well. Since Transpose can be used to wrap arbitrary subtypes of AbstractArray, it can be used with types that override broadcast behaviour such as CuArray.
For DistributedArrays I solved this by using nested BroadcastStyles.
Yeah, I imagine this working the way the current ad-hoc broadcast methods do — just unwrap all the arguments, re-call broadcast on the unwrapped arrays (which will compute the "nested" style) and then appropriately re-wrap.
LinearAlgebra implements broadcasting for transposed/adjoint rows by specializing the
broadcast
method itself for a handful of combinations of types instead of working within the Broadcast system directly. This leads to the following behaviors:Implementing the style will allow us to more consistently do what we want here — preserve the transposed row — but of course it'll be a minor change in the returned array types. We'll need to decide if, e.g.,
identity.(sparse(1:3)')
should be a sparse matrix or an adjoint sparse vector.(This is marked with a TODO in the code but I cannot find a corresponding issue.)
The text was updated successfully, but these errors were encountered: