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

Document {last,first}index(A, d) methods #26337

Merged
merged 2 commits into from
Mar 7, 2018
Merged

Conversation

mbauman
Copy link
Member

@mbauman mbauman commented Mar 6, 2018

As noted in #25763 (comment).

I didn't constrain d::Integer because it's similarly unconstrained in axes.

@mbauman mbauman added docs This change adds or pertains to documentation collections Data structures holding multiple items, e.g. sets labels Mar 6, 2018
@mbauman mbauman requested a review from nalimilan March 6, 2018 15:10
@mbauman mbauman changed the title Document {last,begin}index(A, d) methods Document {last,first}index(A, d) methods Mar 6, 2018

Return the last index of the collection.
Return the last index of `collection`, optionally constrained to be within dimension `d`.
Copy link
Member

Choose a reason for hiding this comment

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

Thanks! "contrain" sounds weird here, doesn't it? After reading it written that way, I didn't understand what the function did anymore. ;-)

Maybe something like "If d is provided, return the last cartesian coordinate for that dimension."? (Or does "cartesian coordinate" only refer to the tuple of indices?)

Copy link
Member Author

Choose a reason for hiding this comment

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

Fair. How about:

Return the last index of collection. If d is given, return the last index of collection along dimension d.

@JeffBezanson JeffBezanson merged commit d87e2b5 into master Mar 7, 2018
@JeffBezanson JeffBezanson deleted the mb/doclastindex branch March 7, 2018 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
collections Data structures holding multiple items, e.g. sets docs This change adds or pertains to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants