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

Using a constant rhs in @tensor #111

Open
feanor12 opened this issue Oct 30, 2021 · 1 comment
Open

Using a constant rhs in @tensor #111

feanor12 opened this issue Oct 30, 2021 · 1 comment

Comments

@feanor12
Copy link

Is it possible to assign a constant using the @tensor macro?

Example:

C=zeros(3,3,3)
@tensor begin
    C[i,i,i] = 6
end
@Jutho
Copy link
Owner

Jutho commented Nov 1, 2021

No that is not supported. TensorOperations is rather restricted. It was motivated by physics applications and only handles expressions which can be thought of as being basis independent. I guess alternatives like Tullio.jl are more flexible and probably more useful for general data science / ML applications.

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

No branches or pull requests

2 participants