# How to "unset" entries in sparse array?

**URL:** https://discourse.julialang.org/t/how-to-unset-entries-in-sparse-array/1793
**Category:** General Usage
**Created:** [January 30, 2017, 11:06pm UTC](https://discourse.julialang.org/t/how-to-unset-entries-in-sparse-array/1793 "2017-01-30T23:06:06Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![e3c6](https://avatars.discourse-cdn.com/v4/letter/e/e79b87/32.png) [@e3c6](https://discourse.julialang.org/u/e3c6)
#### Post date: [January 30, 2017, 11:06pm UTC](https://discourse.julialang.org/t/how-to-unset-entries-in-sparse-array/1793/1 "2017-01-30T23:06:06Z")

</div>

Consider this example:

```julia
x = spzeros(5,5)
x[1,1] = 1.0
x[1,1] = 0.0

```

Now `x` holds the entry at `1,1`, although it is zero:

```julia
julia> x
5×5 sparse matrix with 1 Float64 nonzero entries:
	[1, 1] = 0.0

```

How can I make `x` “forget” the `1,1` entry?

---

<div class="post-metadata">

### Author: ![e3c6](https://avatars.discourse-cdn.com/v4/letter/e/e79b87/32.png) [@e3c6](https://discourse.julialang.org/u/e3c6)
#### Post date: [January 30, 2017, 11:13pm UTC](https://discourse.julialang.org/t/how-to-unset-entries-in-sparse-array/1793/2 "2017-01-30T23:13:23Z")

</div>

Found it: [`dropzeros!`](http://docs.julialang.org/en/stable/stdlib/arrays/#Base.dropzeros!).
