We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Since we often treat StaticArrays almost like scalars, it would be nice to have float and real functions that act on the types. i.e.
float
real
float(::Type{SArray{S,T,N,L}}) where {S,T,N,L} = SArray{S,float(T),N,L} real(::Type{SArray{S,T,N,L}}) where {S,T,N,L} = SArray{S,real(T),N,L}
analogous to e.g. float(Int) === Float64 and real(ComplexF32) == Float32 in Base.
float(Int) === Float64
real(ComplexF32) == Float32
Base
Basically float(T) === typeof(float(zero(T))), and similarly for real.
float(T) === typeof(float(zero(T)))
The text was updated successfully, but these errors were encountered:
StaticArray
390f5c4
Merge pull request #941 from thchr/float-real-satype
fa17430
implement `float` and `real` for `StaticArray` (fix #935)
No branches or pull requests
Uh oh!
There was an error while loading. Please reload this page.
Since we often treat StaticArrays almost like scalars, it would be nice to have
float
andreal
functions that act on the types. i.e.analogous to e.g.
float(Int) === Float64
andreal(ComplexF32) == Float32
inBase
.Basically
float(T) === typeof(float(zero(T)))
, and similarly forreal
.The text was updated successfully, but these errors were encountered: