Skip to content

Conversation

@LilithHafner
Copy link
Member

A is a variable name that makes me think of an array, but this docstring entry is talking about scalars. x also matches the variable name used in the implementation.

x s a value, not a type, so I also changed the word "type" to "value"

@LilithHafner LilithHafner added the docs This change adds or pertains to documentation label May 13, 2023
@Seelengrab
Copy link
Contributor

The argument to reinterpret can also be an array - passing reshape is not required:

julia> reinterpret(UInt8, Int32[1])
4-element reinterpret(UInt8, ::Vector{Int32}):
 0x01
 0x00
 0x00
 0x00

@LilithHafner
Copy link
Member Author

I assumed there was a separate docstring entry for the reinterpret(type, array) case, as that is a substantially different usage than scalar reinterpret. There is one, but it is broken because of #14962. It should be fixed now.

@Seelengrab
Copy link
Contributor

Good to know, thanks for the fix! LGTM then.

@LilithHafner LilithHafner merged commit 344f1f5 into master May 14, 2023
@LilithHafner LilithHafner deleted the LilithHafner-patch-2 branch May 14, 2023 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs This change adds or pertains to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants