# Using LinearSolve or A\\b in @pre?

**URL:** <https://discourse.pumas.ai/t/using-linearsolve-or-a-b-in-pre/975>\
**Category:** How-to\
**Created:** [January 12, 2024, 12:02pm UTC](https://discourse.pumas.ai/t/using-linearsolve-or-a-b-in-pre/975 "2024-01-12T12:02:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dom-linkevicius](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.pumas.ai/dom-linkevicius/32/446_2.png) [@dom-linkevicius](https://discourse.pumas.ai/u/dom-linkevicius)\
**Post date:** [January 12, 2024, 12:02pm UTC](https://discourse.pumas.ai/t/using-linearsolve-or-a-b-in-pre/975/1 "2024-01-12T12:02:07Z")

</div>

Hi,

I am using Pumas for Academia and I would like to do either

```auto
...
@pre 
...
A = ... #some matrix composed of model parameters
b = ... #some vector composed of model parameters

x = A\b
...

```

or

```auto
...
@pre 
...
A = ... #some matrix composed of model parameters
b = ... #some vector composed of model parameters

prob = LinearProblem(A, b)
x = solve(prob)
...

```

but both throw [this stacktrace](https://gist.github.com/dom-linkevicius/3d9e2f429ba3d2ae624d159cb717f41d) (quite long), which is I presume due to it trying to do both symbolically and some relevant operators not being defined. Is there a way to do this currently? Is there a way around the error?

Many thanks!

---

<div class="post-metadata">

**Author:** ![dom-linkevicius](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.pumas.ai/dom-linkevicius/32/446_2.png) [@dom-linkevicius](https://discourse.pumas.ai/u/dom-linkevicius)\
**Post date:** [January 14, 2024, 10:35am UTC](https://discourse.pumas.ai/t/using-linearsolve-or-a-b-in-pre/975/2 "2024-01-14T10:35:52Z")

</div>

Upon some further research the error I am encountering seems to be resolved in [Resolve Symbolics.Num - ForwardDiff.Dual ambiguities by asterycs · Pull Request #1036 · JuliaSymbolics/Symbolics.jl · GitHub](https://github.com/JuliaSymbolics/Symbolics.jl/pull/1036) but I assume it will take quite some time for that to trickle down to the academic Pumas version.
