I am new and dont understand why this doesnt work!
original_cost = npzread("file.npy")
size_cost = size(original_cost)
println('size of original table',size_cost)
left_index = 40
right_index = size_cost - left_index
println(left_index, right_index)
cost = copy(original_cost)
cost=cost[left_index:right_index,left_index:right_index,left_index:right_index,left_index:right_index]
with output
size of original table(101, 101, 101, 101)
MethodError: no method matching -(::NTuple{4,Int64}, ::Int64)
Closest candidates are:
-(!Matched::Complex{Bool}, ::Real) at complex.jl:299
-(!Matched::Missing, ::Number) at missing.jl:94
-(!Matched::Base.CoreLogging.LogLevel, ::Integer) at logging.jl:107
...
Stacktrace:
[1] top-level scope at In[9]:5