# Drop specific elements of sparse arrays

**URL:** https://discourse.julialang.org/t/drop-specific-elements-of-sparse-arrays/78583
**Category:** General Usage
**Tags:** arrays, sparse
**Created:** [March 28, 2022, 3:58am UTC](https://discourse.julialang.org/t/drop-specific-elements-of-sparse-arrays/78583 "2022-03-28T03:58:59Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![fipelle](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fipelle/32/4772_2.png) [@fipelle](https://discourse.julialang.org/u/fipelle)
#### Post date: [March 28, 2022, 3:58am UTC](https://discourse.julialang.org/t/drop-specific-elements-of-sparse-arrays/78583/1 "2022-03-28T03:58:59Z")

</div>

Hi,

I was wondering if it is possible to drop the i-th element of a sparse vector `x` (i.e., setting it to zero) in-place. I am aware that you can do something like `x[i]=0.0; dropzeros!(x)`, but I was wondering if there is a more efficient way or a built-in function for it. Besides, what is the equivalent for `empty!(..)` in the case of sparse arrays?

Thanks!
