julia> (1:3)*0
ERROR: ArgumentError: step cannot be zero
Stacktrace:
[1] steprange_last( ::Int64, ::Int64, ::Int64 ) at ./range.jl:190
[2] _rangestyle at ./range.jl:180 [inlined]
[3] _range at ./range.jl:91 [inlined]
[4] #range#29 at ./range.jl:76 [inlined]
[5] #range at ./none:0 [inlined]
[6] broadcasted at ./broadcast.jl:982 [inlined]
[7] broadcasted at ./broadcast.jl:1142 [inlined]
[8] broadcast at ./broadcast.jl:702 [inlined]
[9] *( ::UnitRange{Int64}, ::Int64 ) at ./arraymath.jl:55
[10] top-level scope at none:0
I’ve had to wrap all ranges in collect() everywhere in my code because otherwise my code is buggy for some input parameters.