# Can't initialize sparse matrices in Julia v1.0.1

**URL:** https://discourse.julialang.org/t/cant-initialize-sparse-matrices-in-julia-v1-0-1/16830
**Category:** New to Julia
**Created:** [October 26, 2018, 3:18pm UTC](https://discourse.julialang.org/t/cant-initialize-sparse-matrices-in-julia-v1-0-1/16830 "2018-10-26T15:18:35Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![tiago](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tiago/32/22567_2.png) [@tiago](https://discourse.julialang.org/u/tiago)
#### Post date: [October 26, 2018, 3:18pm UTC](https://discourse.julialang.org/t/cant-initialize-sparse-matrices-in-julia-v1-0-1/16830/1 "2018-10-26T15:18:35Z")

</div>

Hello,

I’m new in julia and I’m using the new version v1.0.1 and working in Juno.

I was just trying to initialize a sparse matrix and I’m getting the following error:

```julia
A = sparse([1, 2, 3], [1, 2, 3], [0, 2, 0])
ERROR: UndefVarError: sparse not defined

```

I just picked a very simple example that is in [Manual Julia v1.0.1](https://docs.julialang.org/en/v1/stdlib/SparseArrays/index.html) just to show my problem.

I have the LinearAlgebra package already installed and precompiled using the commands `Pkg.add("Linear Algebra")` and `using LinearAlgebra`.

Any solution for this error? I was searching in many places but whitout success.

Cheers,  
Tiago

---

<div class="post-metadata">

### Author: ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)
#### Post date: [October 26, 2018, 3:26pm UTC](https://discourse.julialang.org/t/cant-initialize-sparse-matrices-in-julia-v1-0-1/16830/2 "2018-10-26T15:26:42Z")

</div>

Sparse functionality has moved to the `SparseArrays` stdlib.

---

<div class="post-metadata">

### Author: ![tiago](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tiago/32/22567_2.png) [@tiago](https://discourse.julialang.org/u/tiago)
#### Post date: [October 27, 2018, 8:34pm UTC](https://discourse.julialang.org/t/cant-initialize-sparse-matrices-in-julia-v1-0-1/16830/3 "2018-10-27T20:34:18Z")

</div>

Thank you very much!

Sorry for the noob question :x  
Tiago
