@@ -124,7 +124,7 @@ function Base.show(io::IO, ::MIME"text/plain", p::AbstractParticles{T,N}) where
124
124
end
125
125
end
126
126
127
- function Base. show (io:: IO , :: MIME"text/plain" , z:: Complex{<:AbstractParticles} )
127
+ function Base. show (io:: IO , z:: Complex{<:AbstractParticles} )
128
128
r, i = reim (z)
129
129
compact = get (io, :compact , false )
130
130
print (io, " (" )
@@ -243,9 +243,9 @@ for PT in ParticleSymbols
243
243
Helper function for performing uncertainty propagation through complex-valued functions with vector inputs.
244
244
Applies `f : ℝⁿ → Cⁿ` to an array of particles. E.g., `LinearAlgebra.eigvals(p::Matrix{<:AbstractParticles}) = ℝⁿ2ℂⁿ_function(eigvals,p)`
245
245
"""
246
- function ℝⁿ2ℂⁿ_function (f:: F , p:: AbstractArray{$PT{T,N}} ) where {F,T,N}
246
+ function ℝⁿ2ℂⁿ_function (f:: F , p:: AbstractArray{$PT{T,N}} ; kwargs ... ) where {F,T,N}
247
247
individuals = map (1 : length (p[1 ])) do i
248
- f (getindex .(p,i))
248
+ f (getindex .(p,i); kwargs ... )
249
249
end
250
250
PRT = $ PT{T,N}
251
251
RT = eltype (eltype (individuals))
@@ -558,7 +558,7 @@ LinearAlgebra.norm(x::AbstractParticles, args...) = abs(x)
558
558
559
559
560
560
Base. log (p:: Matrix{<:AbstractParticles} ) = ℝⁿ2ℂⁿ_function (log,p) # Matrix more specific than StridedMatrix used in Base.log
561
- LinearAlgebra. eigvals (p:: Matrix{<:AbstractParticles} ) = ℝⁿ2ℂⁿ_function (eigvals,p)
561
+ # LinearAlgebra.eigvals(p::Matrix{<:AbstractParticles}; kwargs... ) = ℝⁿ2ℂⁿ_function(eigvals,p; kwargs...) # Replaced with implementation below
562
562
Base. exp (p:: AbstractMatrix{<:AbstractParticles} ) = ℝⁿ2ℝⁿ_function (exp, p)
563
563
LinearAlgebra. lyap (p1:: Matrix{<:AbstractParticles} , p2:: Matrix{<:AbstractParticles} ) = ℝⁿ2ℝⁿ_function (lyap, p1, p2)
564
564
0 commit comments