Fix infinite recursion and off-by-one error in triu/tril#1418
Fix infinite recursion and off-by-one error in triu/tril#1418akern40 merged 6 commits intorust-ndarray:masterfrom
Conversation
src/tri.rs
Outdated
|
|
||
| res | ||
| } | ||
| if is_layout_f(&self.dim, &self.strides) && !is_layout_c(&self.dim, &self.strides) { |
There was a problem hiding this comment.
Thanks for the work on this.
Why is there a conditional on memory layout? This purely a performance optimization right? Great place to have a comment to say what it's doing.
There was a problem hiding this comment.
Yes it is - I've added a comment detailing the purpose and the point of the two other && conditions.
bluss
left a comment
There was a problem hiding this comment.
Nice improvements and fixes, lgtm if you don't want to make further changes.
Would you like to squash it down into separate clean commits? Otherwise I can integrate it with a squash merge, same thing, and that also works.
|
Give me one minute to rebase so my commits are signed (switched computers and forgot to turn signing on) and then you can go ahead and squash merge. |
|
I'm not sure why it said it was out of sync with master, maybe because of ci.yaml changes in master. Rebased. |
Also makes the documentation a little nicer to read, since these are such visual methods.
Closes #1415