# \`eachrow\` over Array{Any, 2} does not return rows, why?

**URL:** <https://discourse.julialang.org/t/eachrow-over-array-any-2-does-not-return-rows-why/34601>\
**Category:** General Usage\
**Created:** [February 13, 2020, 8:58pm UTC](https://discourse.julialang.org/t/eachrow-over-array-any-2-does-not-return-rows-why/34601 "2020-02-13T20:58:34Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![JeffreySarnoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jeffreysarnoff/32/1980_2.png) [@JeffreySarnoff](https://discourse.julialang.org/u/JeffreySarnoff)\
**Post date:** [February 13, 2020, 9:56pm UTC](https://discourse.julialang.org/t/eachrow-over-array-any-2-does-not-return-rows-why/34601/6 "2020-02-13T21:56:51Z")

</div>

to use the dot product:

```julia
julia> using LinearAlgebra
julia> m = [1 2 3; 4 5 6];
julia> for row in eachrow(m)
           println( dot(row, [2, 2, 2]) )
       end
12
40

```

The dot product operator is called `dot` and it lives in the `LinearAlgebra` standard library.

---

_[View the full topic](https://discourse.julialang.org/t/eachrow-over-array-any-2-does-not-return-rows-why/34601)._
