Am I doing something wrong here?
m = {{Infinity, Infinity, Infinity}, {Infinity, 1, 2}, {Infinity, 2, 3}};
Position[m, 1]
(*{{1, 1, 1}, {1, 2, 1}, {1, 3, 1}, {2, 1, 1}, {2, 2}, {3, 1, 1}}*)
What is the above? I can get correct position by
m = {{Infinity, Infinity, Infinity}, {Infinity, 1, 2}, {Infinity, 2, 3}};
Position[m, 1, {2}]
(*{{2, 2}}*)
But why it only affect the value 1
?
m = {{Infinity, Infinity, Infinity}, {Infinity, 1, 2}, {Infinity, 2, 3}};
Position[m, 3]
(* {{3, 3}} *)
If I remove Infinity
, then I can find position of 1
ok, without using {2}
m = {{9, 9, 9}, {9, 1, 2}, {9, 2, 3}};
Position[m, 1]
(* {{2, 2}} *)
Why does it behave different with 1
? And what does this {{1, 1, 1}, {1, 2, 1}, {1, 3, 1}, {2, 1, 1}, {2, 2}, {3, 1, 1}}
mean?
Position[N@m, 1.0]
gives the correct answer. $\endgroup$