# Scipy.optimize.nnls usage problem in pymc3

**URL:** <https://discourse.pymc.io/t/scipy-optimize-nnls-usage-problem-in-pymc3/220>\
**Category:** Questions\
**Tags:** from\_github, theano\
**Created:** [August 4, 2017, 2:55pm UTC](https://discourse.pymc.io/t/scipy-optimize-nnls-usage-problem-in-pymc3/220 "2017-08-04T14:55:27Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![junpenglao](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/junpenglao/32/8_2.png) [@junpenglao](https://discourse.pymc.io/u/junpenglao)\
**Post date:** [August 4, 2017, 3:02pm UTC](https://discourse.pymc.io/t/scipy-optimize-nnls-usage-problem-in-pymc3/220/2 "2017-08-04T15:02:07Z")

</div>

Did you try to warp it as a theano op using `as_op`? There are similar discussion here you might found useful: [Fitting a distribution with custom functions](https://discourse.pymc.io/t/fitting-a-distribution-with-custom-functions/210/3)

Also, just a small tip: you can wrap your code as a Markdown code broke [https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#code](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#code)

---

_[View the full topic](https://discourse.pymc.io/t/scipy-optimize-nnls-usage-problem-in-pymc3/220)._
