-
Couldn't load subscription status.
- Fork 122
Description
Hello, the update of QuadGK (a popular library for numerical integration) from v2.5 to v2.6 broke compatibility with Unitful.
To restore compatibility, one would have to extend the QuadGK function cachedrule to also work with quantities with something like
@generated function cachedrule(::Type{T}, n::Integer) where {T<:AbstractQuantity}
TF = typeof(float(real(one(T))))
cache = haskey(rulecache, TF) ? rulecache[TF] : (rulecache[TF] = Dict{Int,NTuple{3,Vector{TF}}}())
:(haskey($cache, n) ? $cache[n] : ($cache[n] = kronrod($T, n)))
end
Unitful and QuadGK don't have each other as dependencies, so it would not be possible to extend either without adding more dependencies.
Do you think it would be beneficial to create a new julia package (like UnitfulQuad or something similar) to make Unitful talk nicely with QuadGK, or do you have any suggestions on how to proceed? I think out of the box numerical integration with units is a strong selling point for Julia!