# Sparse matrices in Eigen with autodiff

**URL:** <https://discourse.mc-stan.org/t/sparse-matrices-in-eigen-with-autodiff/3324>\
**Category:** Developers\
**Created:** [February 16, 2018, 4:51pm UTC](https://discourse.mc-stan.org/t/sparse-matrices-in-eigen-with-autodiff/3324 "2018-02-16T16:51:19Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![yizhang](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/yizhang/32/15673_2.png) [@yizhang](https://discourse.mc-stan.org/u/yizhang)\
**Post date:** [July 30, 2018, 12:48pm UTC](https://discourse.mc-stan.org/t/sparse-matrices-in-eigen-with-autodiff/3324/6 "2018-07-30T12:48:47Z")

</div>

> [@Bob\_Carpenter](#):
>
> Unless this gets fixed, we won’t be able to use their routines for autodiff

One alternative is to use [complex step derivative approximation](https://github.com/stan-dev/math/issues/949), since we can use complex number with eigen’s sparse solver.

---

_[View the full topic](https://discourse.mc-stan.org/t/sparse-matrices-in-eigen-with-autodiff/3324)._
