MethodError: no method matching getindex(::Float64, ::Colon, ::Int64)

I just noticed you are passing in

v_r[i], v_theta[i], B_r[i], B_theta[i], rho[i], tracer[i]

note that these getindex calls will be scalar, but I imagined you meant to take a slice? then it should be

v_r[i, : , :], v_theta[i, :, :] ...
1 Like