JuliaLang/julia

Improve reinterpret docstring

Open

#47,706 创建于 2022年11月25日

在 GitHub 查看
 (2 评论) (0 反应) (0 负责人)Julia (5,773 fork)batch import
docshelp wanted

仓库指标

Star
 (48,709 star)
PR 合并指标
 (平均合并 20天 6小时) (30 天内合并 157 个 PR)

描述

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.

贡献者指南