mindspore.ops.Zeta
- class mindspore.ops.Zeta[source]
Compute the Hurwitz zeta function ζ(x,q) of input Tensor.
\[\zeta \left ( x,q \right )= \textstyle \sum_{n=0} ^ {\infty} \left ( q+n\right )^{-x}\]Warning
This is an experimental API that is subject to change or deletion.
- Inputs:
x (Tensor) - A Tensor, types: float32, float64.
q (Tensor) - A Tensor, must have the same shape and type as x.
- Outputs:
Tensor, has the same dtype and shape as the x.
- Raises
TypeError – If either of x and q is not tensor.
TypeError – If dtype of x is neither float32 nor float64.
TypeError – If dtype of q is neither float32 nor float64.
ValueError – If shape of x is not same as the q.
- Supported Platforms:
Ascend
GPU
CPU
Examples
>>> import mindspore >>> import numpy as np >>> from mindspore import Tensor, ops >>> x = Tensor(np.array([10.]), mindspore.float32) >>> q = Tensor(np.array([1.]), mindspore.float32) >>> zeta = ops.Zeta() >>> z = zeta(x, q) >>> print(z) [1.0009946]