# How to solve the problem ( splu() got an unexpected keyword argument 'is\_symmetric')

**URL:** <https://simpeg.discourse.group/t/how-to-solve-the-problem-splu-got-an-unexpected-keyword-argument-is-symmetric/430>\
**Category:** DC and IP\
**Created:** [April 6, 2023, 3:25am UTC](https://simpeg.discourse.group/t/how-to-solve-the-problem-splu-got-an-unexpected-keyword-argument-is-symmetric/430 "2023-04-06T03:25:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![go\_future](https://avatars.discourse-cdn.com/v4/letter/g/f475e1/32.png) [@go\_future](https://simpeg.discourse.group/u/go_future)\
**Post date:** [April 6, 2023, 3:25am UTC](https://simpeg.discourse.group/t/how-to-solve-the-problem-splu-got-an-unexpected-keyword-argument-is-symmetric/430/1 "2023-04-06T03:25:26Z")

</div>

TypeError Traceback (most recent call last)  
Cell In[19], line 2  
1 halfspace\_resistivity = 100  
----\> 2 dpred = forward\_simulation\_halfspace(mesh, resistivity=halfspace\_resistivity)  
3 plot\_apparent\_resistivities(dpred, halfspace\_resistivity)

Cell In[12], line 15, in forward\_simulation\_halfspace(mesh, survey, resistivity, nky)  
10 rho = resistivity \* np.ones(mesh.nC)  
11 simulation\_dc = dc.Simulation2DNodal(  
12 mesh, rhoMap=maps.IdentityMap(mesh), solver=Solver,  
13 survey=survey, nky=nky  
14 )  
—\> 15 dpred = simulation\_dc.make\_synthetic\_data(rho)  
17 # clear the stored source values if they were previously computed  
18 for src in survey.source\_list:

File ~\anaconda3\envs\t2020\lib\site-packages\SimPEG\simulation.py:363, in BaseSimulation.make\_synthetic\_data(self, m, relative\_error, noise\_floor, f, add\_noise, \*\*kwargs)  
360 relative\_error = std  
362 if f is None:  
 → 363 f = self.fields(m)  
365 dclean = self.dpred(m, f=f)  
367 if add\_noise is True:

File ~\anaconda3\envs\t2020\lib\site-packages\SimPEG\electromagnetics\static\resistivity\simulation\_2d.py:155, in BaseDCSimulation2D.fields(self, m)  
153 if self.Ainv[iky] is not None:  
154 self.Ainv[iky].clean()  
 → 155 self.Ainv[iky] = self.solver(A, \*\*self.solver\_opts)  
156 RHS = self.getRHS(ky)  
157 u = self.Ainv[iky] \* RHS

File ~\anaconda3\envs\t2020\lib\site-packages\SimPEG\utils\solver\_utils.py:46, in SolverWrapD.. **init** (self, A, \*\*kwargs)  
43 self.kwargs = kwargs  
45 if factorize:  
—\> 46 self.solver = fun(self.A, \*\*kwargs)

TypeError: splu() got an unexpected keyword argument ‘is\_symmetric’

---

<div class="post-metadata">

**Author:** ![jcapriot](https://avatars.discourse-cdn.com/v4/letter/j/bbce88/32.png) [@jcapriot](https://simpeg.discourse.group/u/jcapriot)\
**Post date:** [April 7, 2023, 4:09pm UTC](https://simpeg.discourse.group/t/how-to-solve-the-problem-splu-got-an-unexpected-keyword-argument-is-symmetric/430/2 "2023-04-07T16:09:43Z")

</div>

Without any more details (such as version information) it’s hard to give a completely correct answer.

As a first order, it appears your version of SimPEG is rather out of date. For example, in the current code base the at line that threw the error here is now at line 97, (Your posted error claims the failure line was at line 47).

---

<div class="post-metadata">

**Author:** ![go\_future](https://avatars.discourse-cdn.com/v4/letter/g/f475e1/32.png) [@go\_future](https://simpeg.discourse.group/u/go_future)\
**Post date:** [April 9, 2023, 12:51am UTC](https://simpeg.discourse.group/t/how-to-solve-the-problem-splu-got-an-unexpected-keyword-argument-is-symmetric/430/3 "2023-04-09T00:51:49Z")

</div>

dear, sorry, I provide more details, the version of SimPEG is ok。 I also create a certain envirenment for simpeg 2020. The main of problem is the code (dpred = forward\_simulation\_halfspace(mesh, resistivity=halfspace\_resistivity)). Now I upload a screenshot about the question which is provide by jupyter notebook . thanks.

 ![question.png](https://global.discourse-cdn.com/free1/uploads/simpeg/original/1X/17ee26af149093370fdbaffa0d16ebd42791f476.png)

Joseph Capriotti via SimPEG Community Chat \<[notifications@simpeg.discoursemail.com](mailto:notifications@simpeg.discoursemail.com)\> 于2023年4月8日周六 00:19写道：

---

<div class="post-metadata">

**Author:** ![jcapriot](https://avatars.discourse-cdn.com/v4/letter/j/bbce88/32.png) [@jcapriot](https://simpeg.discourse.group/u/jcapriot)\
**Post date:** [April 9, 2023, 2:15am UTC](https://simpeg.discourse.group/t/how-to-solve-the-problem-splu-got-an-unexpected-keyword-argument-is-symmetric/430/4 "2023-04-09T02:15:56Z")

</div>

What version of SimPEG are you running? This error should have been fixed in more recent versions.

---

<div class="post-metadata">

**Author:** ![go\_future](https://avatars.discourse-cdn.com/v4/letter/g/f475e1/32.png) [@go\_future](https://simpeg.discourse.group/u/go_future)\
**Post date:** [April 9, 2023, 6:37am UTC](https://simpeg.discourse.group/t/how-to-solve-the-problem-splu-got-an-unexpected-keyword-argument-is-symmetric/430/5 "2023-04-09T06:37:43Z")

</div>

the version of SimPEG is 0. 14.1.  
If I use the latest SimPEG, the numba package requires the numpy package to be prior to 1.23. I sincerely hope you could help me to solve the problem ,because I majored in geophysics. thanks.

 ![version.png](https://global.discourse-cdn.com/free1/uploads/simpeg/original/1X/5560fe2bb1bc2820d9d347d21b6e9441f4247315.png)

Joseph Capriotti via SimPEG Community Chat \<[notifications@simpeg.discoursemail.com](mailto:notifications@simpeg.discoursemail.com)\> 于2023年4月9日周日 10:26写道：
