# Can I use eachrow, eachcol, etc. to change array's values?

**URL:** <https://discourse.julialang.org/t/can-i-use-eachrow-eachcol-etc-to-change-arrays-values/111834>\
**Category:** New to Julia\
**Tags:** question, array, arrays, iterators\
**Created:** [March 19, 2024, 6:02pm UTC](https://discourse.julialang.org/t/can-i-use-eachrow-eachcol-etc-to-change-arrays-values/111834 "2024-03-19T18:02:46Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![homocomputeris](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/homocomputeris/32/8933_2.png) [@homocomputeris](https://discourse.julialang.org/u/homocomputeris)\
**Post date:** [March 20, 2024, 2:46pm UTC](https://discourse.julialang.org/t/can-i-use-eachrow-eachcol-etc-to-change-arrays-values/111834/9 "2024-03-20T14:46:58Z")

</div>

Thanks for the answers!

In my case, the solution is simply to ditch this machinery and do it the old-school way, [ignoring the linter warnings](https://discourse.julialang.org/t/is-there-a-way-to-turn-off-the-warnings-indexing-with-indices-obtained-from-length-size-etc-is-discouraged-in-vscode/85093/)

```julia
function filter!(table)
    for i in 2:size(table, 1)
        for j in 1:size(table, 2)
            current = table[i, j]
            for k in (j+1):size(table, 2)
                if current > 0 && table[i, k] < current * 2
                    table[i, k] = 0
                end
            end
        end
    end
    return table
end

```

---

_[View the full topic](https://discourse.julialang.org/t/can-i-use-eachrow-eachcol-etc-to-change-arrays-values/111834)._
