# rowvals of transposed matrices in 0.7

**URL:** <https://discourse.julialang.org/t/rowvals-of-transposed-matrices-in-0-7/13391>\
**Category:** General Usage\
**Created:** [August 13, 2018, 4:02pm UTC](https://discourse.julialang.org/t/rowvals-of-transposed-matrices-in-0-7/13391 "2018-08-13T16:02:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![FHulsemann](https://avatars.discourse-cdn.com/v4/letter/f/898d66/32.png) [@FHulsemann](https://discourse.julialang.org/u/FHulsemann)\
**Post date:** [August 13, 2018, 4:02pm UTC](https://discourse.julialang.org/t/rowvals-of-transposed-matrices-in-0-7/13391/1 "2018-08-13T16:02:28Z")

</div>

Dear Julia pros, I am trying to migrate an existing application, that works just fine in 0.6.2, to 0.7 (binary installation on Linux 64bit) and I am having the following problem:  
When calling SparseArrays.rowvals on the original, non-transposed matrix, everything works fine.  
When calling rowvals on the transposed matrix, I am getting a LoadError.  
This is the non-working example:

```julia
using LinearAlgebra
using SparseArrays

function do_something(amat::SparseMatrixCSC)
    ats = Transpose(amat)
    println(typeof(ats))
    rows = SparseArrays.rowvals(ats)
    return rows
end

toy_matrix = sparse(1.0I,3,3)
bla = do_something(toy_matrix)

```

It does not make any difference whether I call SparseArrays.rowvals or rowvals directly.

Any insight is welcome. Best regards, Frank

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [August 13, 2018, 4:09pm UTC](https://discourse.julialang.org/t/rowvals-of-transposed-matrices-in-0-7/13391/2 "2018-08-13T16:09:14Z")

</div>

You can materialize the `transpose`/`adjoint` with `copy`.

```julia
julia> function do_something(amat::SparseMatrixCSC)
           ats = copy(amat')
           println(typeof(ats))
           rows = SparseArrays.rowvals(ats)
           return rows
       end
do_something (generic function with 1 method)

julia> bla = do_something(toy_matrix)
SparseMatrixCSC{Float64,Int64}
3-element Array{Int64,1}:
 1
 2
 3

```

---

<div class="post-metadata">

**Author:** ![FHulsemann](https://avatars.discourse-cdn.com/v4/letter/f/898d66/32.png) [@FHulsemann](https://discourse.julialang.org/u/FHulsemann)\
**Post date:** [August 14, 2018, 1:14pm UTC](https://discourse.julialang.org/t/rowvals-of-transposed-matrices-in-0-7/13391/3 "2018-08-14T13:14:11Z")

</div>

Thank you very much. Indeed, this settles the issue.
