Skip to content
New issue

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

Change reinterpret docstring #49807

Merged
merged 4 commits into from
May 14, 2023
Merged

Change reinterpret docstring #49807

merged 4 commits into from
May 14, 2023

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.

2 participants