I’m new to Julia and I apologize in advance if there’s a simple answer to my question somewhere but I’ve spent lots of time without any success.
I’m trying to re-write the following Python code in Julia
import scipy as sp psi = sp.ones((1000, 1)) idx_blk = range(15) x = sp.diag(1.0/psi[idx_blk].T)
My problem is I don’t know exactly what the
 in the code above is doing (more of a Python issue but was hoping someone here might have a solution).
using LinearAlgebra psi = ones(1000, 1) idx_blk = 1:15 x = Diagonal(1.0 ./ transpose(psi[idx_blk]))