Skip to content

Rename zero_index_with_ndim -> zeros, make it public, and remove zero_index #509

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
merged 3 commits into from
Oct 26, 2018

Conversation

jturner314
Copy link
Member

No description provided.

@jturner314 jturner314 changed the title Rename zero_index_with_ndim -> zeros and make it public Rename zero_index_with_ndim -> zeros, make it public, and remove zero_index Oct 24, 2018
@jturner314 jturner314 merged commit b980ab9 into rust-ndarray:master Oct 26, 2018
@jturner314 jturner314 deleted the dimension-zeros branch October 26, 2018 00:41
@bluss
Copy link
Member

bluss commented Oct 27, 2018

This method doesn't have a nice API. But I realize that there is a need outside of ndarray to use the same ugly APIs we use inside.

@jturner314
Copy link
Member Author

Yeah, it's not pretty that it panics when the ndim argument doesn't match the type. I don't see a good way around this, though, for code that wants to operate on dimensions generically. For code that knows it's working with a particular dimension type, the Ix0/Ix1/Ix2/.../IxDyn functions are available.

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

Successfully merging this pull request may close these issues.

2 participants