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

Basic NumPy Transpose Use Cases #181

Merged
merged 1 commit into from
Oct 14, 2023
Merged

Basic NumPy Transpose Use Cases #181

merged 1 commit into from
Oct 14, 2023

Conversation

J-Douglas
Copy link
Contributor

Overview

Added very basic NumPy transpose functionality. This PR supports the transpose of variables (ie. transpose(A), transpose(b), etc.).

This PR does not support non-variables (ie. numbers) or axes arguments for transpose. I would like to extend this eventually to recursively call latexify on other types of parseable input such as transpose([1, 2, 3]) or transpose(zeros(1)).

Details

Added changes to expression_codegen.py and followed the same style as the NumPy identity implementation.

Added tests to expression_codegen_test.py.

Also black reformatted frontend.py.

I wanted to make a small first PR to learn about the library and also confirm the direction for implementing more NumPy functions. See relevant issues below.

References

#149
#165

Blocked by

N/A

@J-Douglas J-Douglas requested a review from odashi as a code owner October 11, 2023 04:27
Copy link
Collaborator

@odashi odashi left a comment

Choose a reason for hiding this comment

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

Great, thanks!

@odashi odashi merged commit 37d47c9 into google:main Oct 14, 2023
10 checks passed
@J-Douglas J-Douglas deleted the numpy branch October 16, 2023 02:23
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.

2 participants