Julia indexing question

I have a matrix as below:
A = [1 2 3; 4 5 6];

I need to find the index of those that meet these requirements

Ind = map(A) do a
    (a > 4) || (a <3);
end

Here are the results:
2×3 Matrix{Bool}:
1 1 0
0 1 1

Everything has been working so far. My goal is to replace all those elements with a new number 88. Why didn’t the below script work?
A[Ind] .= 88;

I’m supposed to get a new matrix like this:

88 88 3
4 88 88

But the results Julia gives me is as below:
88
88
88
88

How should I archive my goal in this case? Many thanks!

It is working as you intended:

julia> A[Ind] .= 88
4-element view(::Vector{Int64}, [1, 3, 4, 6]) with eltype Int64:
 88
 88
 88
 88

julia> A
2×3 Matrix{Int64}:
 88  88   3
  4  88  88

Note that what Julia returns from an assignment expression isn’t always going to be the value on the LHS, but that doesn’t mean the assignment didn’t occur!

4 Likes