-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Improved English and egs #29281
Merged
Merged
Improved English and egs #29281
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The examples starting around line 80 showing how to create arrays with dimensions are unhelpful because in every case the dimensions are 2x2 so people don't get any sense of which dimension is which. So I've changed them all to 2x3 which doesn't take up any more vertical space but makes it much clearer which dimension is which. I don't like the Comprehensions example because the expression is much too complicated: the idea is to show comprehensions, so I think the expression should be a lot simpler. I changed the `searchsorted` eg to make the searched for number different from all the others to improve clarity. I think the warning about CartesianIndexes and end should give some hint as to what would happen: would Julia notice and react or not notice and just produce wrong results? The Iteraration section should explain or at least cross-ref. to how to enumerate, i.e., how to get (index, value) tuples. Personally I'd use "etc." rather than "etcetera" but that would be a global style change. I think it'd be a lot easier if you kept .md doc files to <500 lines.
doc/src/manual/arrays.md
Outdated
0 0 | ||
0 0 | ||
julia> zeros(Int8, (2, 3)) | ||
2×3 Array{Int8,3}: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should still be Array{Int8,2}
.
Good changes; thanks. |
KristofferC
pushed a commit
that referenced
this pull request
Oct 6, 2018
Improved English and egs The examples starting around line 80 showing how to create arrays with dimensions are unhelpful because in every case the dimensions are 2x2 so people don't get any sense of which dimension is which. So I've changed them all to 2x3 which doesn't take up any more vertical space but makes it much clearer which dimension is which. I don't like the Comprehensions example because the expression is much too complicated: the idea is to show comprehensions, so I think the expression should be a lot simpler. I changed the `searchsorted` eg to make the searched for number different from all the others to improve clarity. (cherry picked from commit 29b780e)
KristofferC
pushed a commit
that referenced
this pull request
Feb 11, 2019
Improved English and egs The examples starting around line 80 showing how to create arrays with dimensions are unhelpful because in every case the dimensions are 2x2 so people don't get any sense of which dimension is which. So I've changed them all to 2x3 which doesn't take up any more vertical space but makes it much clearer which dimension is which. I don't like the Comprehensions example because the expression is much too complicated: the idea is to show comprehensions, so I think the expression should be a lot simpler. I changed the `searchsorted` eg to make the searched for number different from all the others to improve clarity. (cherry picked from commit 29b780e)
KristofferC
pushed a commit
that referenced
this pull request
Feb 20, 2020
Improved English and egs The examples starting around line 80 showing how to create arrays with dimensions are unhelpful because in every case the dimensions are 2x2 so people don't get any sense of which dimension is which. So I've changed them all to 2x3 which doesn't take up any more vertical space but makes it much clearer which dimension is which. I don't like the Comprehensions example because the expression is much too complicated: the idea is to show comprehensions, so I think the expression should be a lot simpler. I changed the `searchsorted` eg to make the searched for number different from all the others to improve clarity. (cherry picked from commit 29b780e)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The examples starting around line 80 showing how to create arrays with dimensions are unhelpful because in every case the dimensions are 2x2 so people don't get any sense of which dimension is which. So I've changed them all to 2x3 which doesn't take up any more vertical space but makes it much clearer which dimension is which.
I don't like the Comprehensions example because the expression is much too complicated: the idea is to show comprehensions, so I think the expression should be a lot simpler.
I changed the
searchsorted
eg to make the searched for number different from all the others to improve clarity.I think the warning about CartesianIndexes and end should give some hint as to what would happen: would Julia notice and react or not notice and just produce wrong results?
The Iteraration section should explain or at least cross-ref. to how to enumerate, i.e., how to get (index, value) tuples.
Personally I'd use "etc." rather than "etcetera" but that would be a global style change.
I think it'd be a lot easier if you kept .md doc files to <500 lines.