JuliaLang/julia

Improve reinterpret docstring

Open

#47.706 aperta il 25 nov 2022

Vedi su GitHub
 (2 commenti) (0 reazioni) (0 assegnatari)Julia (5773 fork)batch import
docshelp wanted

Metriche repository

Star
 (48.709 star)
Metriche merge PR
 (Merge medio 20g 6h) (157 PR mergiate in 30 g)

Descrizione

reinterpret(type, A) The docstring does not mention what types are allowed in type. I believe it is any type that isbitstype or eltype(A) itself, regardless of whether or not it is a bits type, but I'm not sure.

Additionally, in Julia 1.8.3 and 1.6.3, this works: reinterpret(Real, Real[1,2,3]). In Julia 1.0.5, it throws. Perhaps this warrants a compat entry? Or perhaps 1.0 is too far gone for that.

Guida contributor