Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/FillArrays.jl
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,6 @@ cumsum(x::AbstractZerosVector{Bool}) = x
cumsum(x::AbstractOnesVector{II}) where II<:Integer = convert(AbstractVector{II}, oneto(length(x)))
cumsum(x::AbstractOnesVector{Bool}) = oneto(length(x))


#########
# Diff
#########
Expand Down
4 changes: 3 additions & 1 deletion src/fillalgebra.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ vec(a::AbstractFill) = fillsimilar(a, length(a))
## Transpose/Adjoint
# cannot do this for vectors since that would destroy scalar dot product


transpose(a::Union{AbstractOnesMatrix, AbstractZerosMatrix}) = fillsimilar(a, reverse(axes(a)))
adjoint(a::Union{AbstractOnesMatrix, AbstractZerosMatrix}) = fillsimilar(a, reverse(axes(a)))
transpose(a::FillMatrix{T}) where T = Fill{T}(transpose(a.value), reverse(a.axes))
Expand All @@ -30,6 +29,9 @@ end
reverse(A::AbstractFill; dims=:) = A

## Algebraic identities
@inline checkdimensionmismatch(a::AbstractVecOrMat, b::AbstractVecOrMat) = axes(a, 2) ≠ axes(b, 1) && throw(DimensionMismatch("A has axes $(axes(a)) but B has axes $(axes(b))"))
@inline productaxes(a::AbstractVecOrMat, b::AbstractVector) = (axes(a, 1),)
@inline productaxes(a::AbstractVecOrMat, b::AbstractMatrix) = (axes(a, 1), axes(b, 2))

# Default outputs, can overload to customize
mult_fill(a, b, val, ax) = Fill(val, ax)
Expand Down