Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Improved Documentation #63

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

Merged
xd009642 merged 11 commits into rust-ndarray:master from lebensterben:histogram
Dec 3, 2020
Merged

Improved Documentation #63

xd009642 merged 11 commits into rust-ndarray:master from lebensterben:histogram
Dec 3, 2020

Conversation

@lebensterben
Copy link
Contributor

@lebensterben lebensterben commented Apr 14, 2020

histogram/grid.rs: Docs

  • Added some doc tests
  • Minor reformatting

- Added some doc tests
- Minor reformatting
- More documentations are added.
- Also adjusted some formatting.
- Merged imports
- By enabling `clippy::all` and `clippy::pedantic` lints,
 - Marked several methods as `must_use`
 - Found a redundant closue ( `Bins::len` is also more informative on the type
 than `|e| e.len()` )
`left inclusive` and `right exclusive` are not standard math terminology.
It should be phrased as `left-closed` and `right-open`.
`Out of bound` -> `Out of bounds`
`Out-of-bound` -> `Out-of-bounds`
- Rewrites and reformats docs. Hopefully it's more aligned to the style in std
 library.
- Replaced `left-inclusive-right-exclusive` by `left-closed-right-open`, which
 is more common in maths.
- Added `missing_docs` lints from `rustc`
- Added `clippy::all` and `clippy::pedantic` lints
 - Marked methods with `must_use`
 - Improved code style according to clippy
- Added more information in mod-level documentation, including
 - A section for strategies currently implemented
 - A section for requirement of data to infer optimal parameters
- Reformatting
- Added `missing_docs`, `clippy::all`, and `cippy::pedantic` lints
 - They helped to find certain problems when casting values into other types,
 none of the warning is relavant and are suppresed and commented
 - It also warns that the private function `bin_width` doesn't consume the
 input, so their type signature can be changed to a reference. But actually
 this is because this function `clone`ed the inputs. This is not a good
 pattern as it hides the clones. It's better to leave this to the caller and
 make the clone explicit. So this commit removed the `clone` inside of this
 function, and documented that the inputs would be consumed.
Copy link
Collaborator

xd009642 commented Dec 1, 2020

@lebensterben I was going to take a look at this with a view of merging it. Just wondering if there was a specific reason it was in draft i.e. more planned changes etc?

@xd009642 xd009642 marked this pull request as ready for review December 3, 2020 06:03
@xd009642 xd009642 self-requested a review December 3, 2020 06:03
Copy link
Collaborator

xd009642 commented Dec 3, 2020

So I've spent some time going over all these changes and I think they're all good and see no issues. So I'm going to merge this with the view of getting a new version of ndarray-stats out with them included 👍

@xd009642 xd009642 merged commit 1510485 into rust-ndarray:master Dec 3, 2020
Copy link
Contributor Author

@xd009642
Hi,
I spotted some features not implemented and started implementing them, but then I have to work on other stuff so it's not finished yet.

Copy link
Collaborator

xd009642 commented Dec 6, 2020

Ah fair enough, if you want to raise an issue or open another PR since I merged this one. I think a general issue with a checklist of missing or lacking parts of the docs would be good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@xd009642 xd009642 xd009642 approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /