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

Making transpose function as a property #97

Closed
adtzlr opened this issue Aug 9, 2023 Discussed in #96 · 2 comments · Fixed by #98
Closed

Making transpose function as a property #97

adtzlr opened this issue Aug 9, 2023 Discussed in #96 · 2 comments · Fixed by #98
Assignees
Labels
enhancement New feature or request

Comments

@adtzlr
Copy link
Owner

adtzlr commented Aug 9, 2023

Discussed in #96

Originally posted by ZAARAOUI999 August 9, 2023
Hi Mr Andreas, I wanna share with you this small trick, it looks like not interesting but...
So, my idea is just to add @property before this function in the Tensor class:

@property
def T(self):
        return transpose(self)

So the user can get the transpose with just typing Tensor.T rather than Tensor.T()
Thanks.

@adtzlr
Copy link
Owner Author

adtzlr commented Sep 16, 2024

@all-contributors please add @ZAARAOUI999 for ideas in #96 (and #98)

Copy link
Contributor

@adtzlr

I've put up a pull request to add @ZAARAOUI999! 🎉

@adtzlr adtzlr closed this as completed Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant