Skip to content

Add helper for special.kn that just calls special.kv under the hood #1308

@SimonEnsemble

Description

@SimonEnsemble

After

I wish for

pytensor.tensor.math.kn(0, 1.0)

to compute the modified Bessel function of the second kind, of order zero, at a generic point on its domain (e.g. 1.0 here).

Context for the issue:

I am unable to use Scipy's implementation scipy.special.kn (link) of the modified Bessel function of the second kind of integer order n (n=0 is what I need) in PyMC since it does not handle autodiff.

I see there are many Bessel functions implemented already in pytensor, but the modified Bessel function of the second kind, of order zero, is not. I am kindly requesting an implementation of this for my project modeling the spread of chemical plumes (link) to search for the source of a chemical plume using Bayesian inference in PyMC.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions