# How to determine whether the rule of an DynamicalSystem instance is inplace?

**URL:** https://discourse.julialang.org/t/how-to-determine-whether-the-rule-of-an-dynamicalsystem-instance-is-inplace/123041
**Category:** Modelling & Simulations
**Tags:** dynamical-systems
**Created:** [November 25, 2024, 8:47am UTC](https://discourse.julialang.org/t/how-to-determine-whether-the-rule-of-an-dynamicalsystem-instance-is-inplace/123041 "2024-11-25T08:47:14Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![andreasmorr](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/andreasmorr/32/212240_2.png) [@andreasmorr](https://discourse.julialang.org/u/andreasmorr)
#### Post date: [November 25, 2024, 8:47am UTC](https://discourse.julialang.org/t/how-to-determine-whether-the-rule-of-an-dynamicalsystem-instance-is-inplace/123041/1 "2024-11-25T08:47:14Z")

</div>

I would like to define a function that takes a DynamicalSystem `ds` as an argument and computes the Jacobian of `dynamic_rule(ds)` for further analysis. For this, it would be good to know whether `dynamic_rule(ds)` returns an inplace function or out-of-place. Is there such a functionality? Would it be safe to use `m = first(methods(dynamic_rule(ds)))` and then ask `m.nargs==4` for and inplace function?

---

<div class="post-metadata">

### Author: ![baggepinnen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/baggepinnen/32/693_2.png) [@baggepinnen](https://discourse.julialang.org/u/baggepinnen)
#### Post date: [November 25, 2024, 8:50am UTC](https://discourse.julialang.org/t/how-to-determine-whether-the-rule-of-an-dynamicalsystem-instance-is-inplace/123041/2 "2024-11-25T08:50:25Z")

</div>

Check `Base.hasmethod`?

---

<div class="post-metadata">

### Author: ![Datseris](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/datseris/32/13406_2.png) [@Datseris](https://discourse.julialang.org/u/Datseris)
#### Post date: [November 25, 2024, 8:59am UTC](https://discourse.julialang.org/t/how-to-determine-whether-the-rule-of-an-dynamicalsystem-instance-is-inplace/123041/3 "2024-11-25T08:59:01Z")

</div>

There is a function for that, ‘isinplace’ that operates on the dynamical system directly.

CU!

George
