Hi,
The code block below achieves its purpose but Julia provides a warning for how the argument is passed.
key1 = [ 1, 1, 2, 3, 3, 4]; key2 = [ 2, 3, 4, 4, 5, 5]
value = [0.3, 0.145, 0.032, 0.260, 0.320, 0.500]
Data = Dict{Tuple{Int64, Int64}, Float64}();
for i in 1:6
Data[(key1[i],key2[i])] = value[i]
end
filter(((k1,k2),v) -> k1 == 1, Data)
Is there a correct way to rewrite this so that the warning is not triggered?
Any help would be much appreciated.
Also, apologies if my question is posted in the wrong section of the forum (or not following the guidelines).
I am new to this…