pymiediff.special.sph_yn_torch

Contents

pymiediff.special.sph_yn_torch#

pymiediff.special.sph_yn_torch(n: Tensor, z: Tensor, eps=1e-07, **kwargs)#

Vectorized spherical Bessel of the first kind via updward recurrence

Returns all orders. Vectorized over all z.

Parameters:
  • n (torch.Tensor or int) – integer order(s)

  • z (torch.Tensor) – complex (or real) arguments to evalute

  • eps (float) – minimum value for |z| to avoid numerical instability

  • kwargs – other kwargs are ignored

Returns:

tensor of same shape of input z + (n_max+1,) dimension, where last dim indexes the order n=0..n_max.

Return type:

torch.Tensor