Can't the inner product be used in Julia 1.0.2?

Asked 1 years ago, Updated 1 years ago, 96 views

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

2022-09-30 18:12

1 Answers

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.


2022-09-30 18:12

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.