FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix infinite recursion and off-by-one error in triu/tril by akern40 · Pull Request #1418 · rust-ndarray/ndarray · GitHub

Fix infinite recursion and off-by-one error in triu/tril - #1418

Merged
akern40 merged 6 commits into
rust-ndarray:masterfrom
akern40:fix-1415
Aug 11, 2024
Merged

Fix infinite recursion and off-by-one error in triu/tril#1418
akern40 merged 6 commits into
rust-ndarray:masterfrom
akern40:fix-1415

Conversation

akern40 commented Aug 7, 2024

Copy link
Copy Markdown
Collaborator

Also makes the documentation a little nicer to read, since these are such visual methods.

Closes #1415

akern40 self-assigned this Aug 7, 2024
Comment thread src/tri.rs
Comment thread src/tri.rs Outdated

res
}
if is_layout_f(&self.dim, &self.strides) && !is_layout_c(&self.dim, &self.strides) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Yes it is - I've added a comment detailing the purpose and the point of the two other && conditions.

Comment thread src/tri.rs
Comment thread src/tri.rs
Comment thread src/tri.rs
bluss added this to the 0.16.x milestone Aug 7, 2024
bluss changed the title Fixes infinite recursion and off-by-one error Fix infinite recursion and off-by-one error Aug 7, 2024
Comment thread src/tri.rs
bluss changed the title Fix infinite recursion and off-by-one error Fix infinite recursion and off-by-one error in triu/tril Aug 8, 2024

bluss left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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.

akern40 commented Aug 8, 2024

Copy link
Copy Markdown
Collaborator Author

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.

bluss commented Aug 9, 2024

Copy link
Copy Markdown
Member

I'm not sure why it said it was out of sync with master, maybe because of ci.yaml changes in master. Rebased.

akern40 merged commit 1df6c32 into rust-ndarray:master Aug 11, 2024
akern40 deleted the fix-1415 branch August 11, 2024 15:15
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

tril and triu fail on 1×1 matrices

2 participants


Back | FazBrowse Home | New Git URL