scipy.special.itmodstruve0#

scipy.special.itmodstruve0(x, out=None) = <wrapped_ufunc 'itmodstruve0'>#

Integral of the modified Struve function of order 0.

\[I = \int_0^x L_0(t)\,dt\]
Parameters:
xarray_like

Upper limit of integration (float).

outndarray, optional

Optional output array for the function values

Returns:
Iscalar or ndarray

The integral of \(L_0\) from 0 to x.

See also

modstruve

Modified Struve function which is integrated by this function

Notes

Wrapper for a Fortran routine created by Shanjie Zhang and Jianming Jin [1].

Array API Standard Support

itmodstruve0 has support for Python Array API Standard compatible backends in addition to NumPy. The following combinations of backend and device (or other capability) are supported.

Library

CPU

GPU

NumPy

✅

n/a

CuPy

n/a

⛔

PyTorch

✅

⛔

JAX

✅

⛔

Dask

✅

n/a

For the NumPy backend, this function supports all NumPy ufunc keyword arguments. Other backends may support out, but typically none of the other ufunc kwargs. out is typically supported for CuPy and PyTorch, but not currently in cases where SciPy relies on a generic Array API implementation or, for PyTorch on CPU, falls back to the NumPy backend. out is never supported for JAX because JAX arrays are immutable. itmodstruve0 does not currently support out for the PyTorch backend.

See Array API coverage for more information.

References

[1]

Zhang, Shanjie and Jin, Jianming. “Computation of Special Functions”, John Wiley and Sons, 1996. https://people.sc.fsu.edu/~jburkardt/f_src/special_functions/special_functions.html

Examples

Evaluate the function at one point.

>>> import numpy as np
>>> from scipy.special import itmodstruve0
>>> itmodstruve0(1.)
0.3364726286440384

Evaluate the function at several points by supplying an array for x.

>>> points = np.array([1., 2., 3.5])
>>> itmodstruve0(points)
array([0.33647263, 1.588285  , 7.60382578])

Plot the function from -10 to 10.

>>> import matplotlib.pyplot as plt
>>> x = np.linspace(-10., 10., 1000)
>>> itmodstruve0_values = itmodstruve0(x)
>>> fig, ax = plt.subplots()
>>> ax.plot(x, itmodstruve0_values)
>>> ax.set_xlabel(r'$x$')
>>> ax.set_ylabel(r'$\int_0^xL_0(t)\,dt$')
>>> plt.show()
../../_images/scipy-special-itmodstruve0-1.png