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

safe access method #420

Merged
merged 1 commit into from Sep 18, 2017
Merged

Conversation

JohanMabille
Copy link
Member

Fix #418

@JohanMabille JohanMabille merged commit f2271f8 into xtensor-stack:master Sep 18, 2017
@JohanMabille JohanMabille deleted the safe_access branch September 18, 2017 12:43
throw std::out_of_range("Number of arguments (" + std::to_string(sizeof...(Args)) + ") us greater "
+ "than the number of dimensions (" + std::to_string(shape.size()) + ")");
}
}
Copy link
Member

Choose a reason for hiding this comment

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

Should check_access and check_dimension be in xstrides?

Copy link
Member

Choose a reason for hiding this comment

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

I am not sure we want to check the dimension at all, since we have a clear rule about what to do when too many arguments are provided.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sorry I missed the comments before I merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants