pymiediff.special.sph_jn_torch

Contents

pymiediff.special.sph_jn_torch#

pymiediff.special.sph_jn_torch(n: Tensor | int, z: Tensor, n_add: str | int = 'auto', max_n_add: int = 50, small_z: float = 1e-08, precision='double', **kwargs)#

Torch-native j_n via continued-fraction ratios.

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

  • z (torch.Tensor) – Complex argument(s).

  • n_add ({"auto"} or int, default="auto") – Extra continued-fraction depth.

  • max_n_add (int, default=50) – Upper bound for automatic extra depth.

  • small_z (float, default=1e-8) – Threshold using small-argument series.

  • precision ({"single", "double"}, default="double") – Complex dtype selection.

Returns:

j_n(z) for orders 0..n.

Return type:

torch.Tensor