It says on the net that Julia's inner product should be dot(A,B).
Now, if you use dot in the array below,
n=3
psi = zeros (Float 32, n, n, n, 6)
psi[1,1,1:] = [1/sqrt(2), 1,1,1,1,1,1]
psi[1,1,1:].*psi[1,1,:]
dot(psi[1,1,1,:], psi[1,1,:])
Calculating that
UndefVarError: dot not defined
Stacktrace:
[1] top-level scope at In [46]: 6
he said.Isn't it in this version?
julia
At the beginning of Linear Algebra ·The Julia Language
...useful linear algebra operations which can be loaded with using LinearAlgebra.
It says, so it would be better to run it after using LinearAlgebra
.
This post was posted as a community wiki based on @metropolis' comments.
© 2024 OneMinuteCode. All rights reserved.