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
As we can see with this minimal example, reciprocalbasis does not work well with Unitful quantities:
using Unitful
using Bravais: reciprocalbasis
Rs = ([1.0, 0.0, 0.0], [-0.5, sqrt(3)/2, 0.0], [0, 0, 1.25])
Us =map(Rs) do v v *1u"Å"end@showreciprocalbasis(Rs) # works@showreciprocalbasis(Us) # StackOverflowError
It yields a stack overflow error. For me, this is likely due to the fact that the input and output dimensions are different ($L^3$ and $L^{-3}$ respectively), so type inference has some troubles.
Is there a possible workaround ? (apart from the trivial one of stripping the units before and putting them back after)
The text was updated successfully, but these errors were encountered:
StaticVector{D, <:AbstractVector{<:Real}}}) where D
The question, I suppose, is whether DirectBasis and ReciprocalBasis optionally should take a eltype which isn't Float64? Feedback and usecases would be welcome!
Hi,
As we can see with this minimal example,
reciprocalbasis
does not work well with Unitful quantities:It yields a stack overflow error. For me, this is likely due to the fact that the input and output dimensions are different ($L^3$ and $L^{-3}$ respectively), so type inference has some troubles.
Is there a possible workaround ? (apart from the trivial one of stripping the units before and putting them back after)
The text was updated successfully, but these errors were encountered: