# Erros when calling a function when using pymc3

**URL:** <https://discourse.pymc.io/t/erros-when-calling-a-function-when-using-pymc3/13349>\
**Category:** v3\
**Tags:** theano\
**Created:** [November 21, 2023, 1:54pm UTC](https://discourse.pymc.io/t/erros-when-calling-a-function-when-using-pymc3/13349 "2023-11-21T13:54:33Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![jessegrabowski](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/jessegrabowski/32/5010_2.png) [@jessegrabowski](https://discourse.pymc.io/u/jessegrabowski)\
**Post date:** [November 21, 2023, 3:54pm UTC](https://discourse.pymc.io/t/erros-when-calling-a-function-when-using-pymc3/13349/2 "2023-11-21T15:54:12Z")

</div>

In general, you cannot use numpy or scipy functions together with pytensor tensors. This is especially true for scipy, which is often calling to compiled code under the hood. These don’t know what pytensor symbolic tensors are, and can’t do anything with them.

You need to use an appropriate function from pytensor, or write your own if it doesn’t exist. See [here](https://discourse.pymc.io/t/integration-ode-and-lambert-w-function-in-pymc4/10897), [here](https://discourse.pymc.io/t/updating-pymc2-code-to-new-version-of-pymc-deterministic-variables-obtained-by-integrating-gaussian-processes/13082), and [here](https://www.pymc.io/projects/examples/en/latest/howto/blackbox_external_likelihood_numpy.html) for examples/discussion.

---

_[View the full topic](https://discourse.pymc.io/t/erros-when-calling-a-function-when-using-pymc3/13349)._
