@@ -168,7 +168,7 @@ function ProjectTo(xs::AbstractArray)
168
168
if elements isa AbstractArray{<: ProjectTo{<:AbstractZero} }
169
169
return ProjectTo {NoTangent} () # short-circuit if all elements project to zero
170
170
elseif elements isa AbstractArray{<: ProjectTo{Any} }
171
- return ProjectTo {AbstractArray} (; element= ProjectTo (), axes= axes (xs)) # ... or none project
171
+ return ProjectTo {AbstractArray} (; element= ProjectTo (), axes= axes (xs)) # ... or all identity projection
172
172
else
173
173
# Arrays of arrays come here, and will apply projectors individually:
174
174
return ProjectTo {AbstractArray} (; elements= elements, axes= axes (xs))
@@ -187,7 +187,7 @@ function (project::ProjectTo{AbstractArray})(dx::AbstractArray{S,M}) where {S,M}
187
187
reshape (dx, project. axes)
188
188
end
189
189
# Then deal with the elements. One projector if AbstractArray{<:Number},
190
- # or one per element for arrays of arrays:
190
+ # or one per element for arrays of anything else, including arrays of arrays:
191
191
dz = if hasfield (typeof (backing (project)), :element )
192
192
T = project_type (project. element)
193
193
S <: T ? dy : map (project. element, dy)
@@ -326,7 +326,7 @@ function (project::ProjectTo{SymTridiagonal})(dx::AbstractMatrix)
326
326
end
327
327
(project:: ProjectTo{SymTridiagonal} )(dx:: SymTridiagonal ) = generic_projection (project, dx)
328
328
329
- # another strategy is just to use the AbstratArray method
329
+ # another strategy is just to use the AbstractArray method
330
330
function ProjectTo (x:: Tridiagonal{T} ) where {T<: Number }
331
331
notparent = invoke (ProjectTo, Tuple{AbstractArray{T}} where T<: Number , x)
332
332
return ProjectTo {Tridiagonal} (; notparent = notparent)
0 commit comments