Skip to content

Commit

Permalink
Update doc of reshape
Browse files Browse the repository at this point in the history
  • Loading branch information
tfmlaX committed Dec 17, 2024
1 parent e25e92f commit b387d5a
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions src/reshape.jl
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
"""
Base.reshape(x::Number, dims...)
Reshape any matrix with dimensions "dims"
Reshape a number `x` into a tensor with `length(dims)` legs that must all be of dimension 1
# Example
```julia-repl
julia> A = rand(2,3,2)
julia> B = reshape(A,4,3)
julia> size(B) == (4,3)
```
"""
function Base.reshape(x::Number, dims...)
prod(dims) == 1 || throw(DimensionMismatch("new dimensions $(dims) must be consistent with array size 1"))
Expand Down

2 comments on commit b387d5a

@tfmlaX
Copy link
Member Author

@tfmlaX tfmlaX commented on b387d5a Jan 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/123935

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v1.1.0 -m "<description of version>" b387d5ac005d4ac33f48b25c82f9adc5a0742ef7
git push origin v1.1.0

Also, note the warning: This looks like a new registration that registers version 1.1.0.
Ideally, you should register an initial release with 0.0.1, 0.1.0 or 1.0.0 version numbers
This can be safely ignored. However, if you want to fix this you can do so. Call register() again after making the fix. This will update the Pull request.

Please sign in to comment.