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

[Lang] Matrix lib: Stop changing dimension in transpose() #6528

Merged
merged 3 commits into from
Nov 7, 2022

Conversation

strongoier
Copy link
Contributor

Issue: #5819

Brief Summary

This PR enforces that vector.transpose() returns a vector while matrix.transpose() returns a matrix, which mimics the behavior of numpy.

@netlify
Copy link

netlify bot commented Nov 7, 2022

Deploy Preview for docsite-preview ready!

Name Link
🔨 Latest commit 9ba5b23
🔍 Latest deploy log https://app.netlify.com/sites/docsite-preview/deploys/63689308b2c2ff000ae0be09
😎 Deploy Preview https://deploy-preview-6528--docsite-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@strongoier strongoier added the full-ci Run complete set of CI tests label Nov 7, 2022
Copy link
Contributor

@jim19930609 jim19930609 left a comment

Choose a reason for hiding this comment

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

Awesome!

Btw, let's keep an eye on the nightly-run after this PR get merged

@strongoier strongoier merged commit 8b53cd4 into taichi-dev:master Nov 7, 2022
@strongoier strongoier deleted the change-transpose branch November 7, 2022 08:47
strongoier added a commit that referenced this pull request Dec 6, 2022
Issue: #5819

### Brief Summary

The background is that we would like to clearly distinguish vectors from
matrices. After #6528, `transpose()` of a vector makes no sense so we'd
better raise an error and guide users towards the current practice
(`outer_product()`).

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
quadpixels pushed a commit to quadpixels/taichi that referenced this pull request May 13, 2023
…#6528)

Issue: taichi-dev#5819

### Brief Summary

This PR enforces that `vector.transpose()` returns a vector while
`matrix.transpose()` returns a matrix, which mimics the behavior of
numpy.

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
quadpixels pushed a commit to quadpixels/taichi that referenced this pull request May 13, 2023
…dev#6813)

Issue: taichi-dev#5819

### Brief Summary

The background is that we would like to clearly distinguish vectors from
matrices. After taichi-dev#6528, `transpose()` of a vector makes no sense so we'd
better raise an error and guide users towards the current practice
(`outer_product()`).

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
full-ci Run complete set of CI tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants