Uh oh!
There was an error while loading. Please reload this page.
Add getter for dim in Shape and StrideShape - #978
Conversation
Uh oh!
There was an error while loading. Please reload this page.
cd997b9 to
f9e85a7Comparebluss
commented
Apr 12, 2021
This looks good to me. Since we have some unfortunate naming around dimensions, these methods should probably be called |
bluss
commented
Apr 12, 2021
The |
stokhos
commented
Apr 12, 2021
Do you have a plan for resolving the naming issue? Cause I feel this would be an great opportunity for me to learn the internals. |
f9e85a7 to
1b4abf1Compareminor fix changed method name
bluss
commented
Apr 12, 2021
Resolving the name for arrays in general won't come until we remake dimensions for const generics (ndarray 0.16 or later). Right now I'm wondering what you think about the naming. I could see either .dimension() or .raw_dim() being a good choice here. |
1b4abf1 to
bed9c63Comparestokhos
commented
Apr 12, 2021
I have changed method name from |
The reason I used |
bluss
left a comment
There was a problem hiding this comment.
Thanks, looks good. I give up the naming, either would be fine, this is consistent (sadly).
So if we stick to convention, do we need to change |
jturner314
commented
Apr 16, 2021
I agree that While we're at it, I'd like an |
The is_f method sounds fine - but it might as well be a separate PR, no need truly to pile-on an already good PR (so it's entirely voluntary 🙂 ). Note that the Shape/StrideShape things are due for redesign |
stokhos
commented
Apr 16, 2021
I'd like to work on the |
bluss
commented
Apr 17, 2021
It is good to avoid extra formatting changes, but it's not so much of it here. Thanks for this. |
Code should compile. fixes#820
But there are 2 parts that I'm not sure.
(3,2).f()returns an instance that has the traitShapeBuilder. I'm confused that it seems onlyShapeandStrideShapeimplementedShapeBuilder. Why does(usize, usize)also have.f()method?StrideShape? The 'Stride' is entirely new to me. Can someone give me an example over this?It looks like my vim formats the code automatically. Is that ok, or I have to follow the original format?