mindspore.ops.mvlgamma
- mindspore.ops.mvlgamma(input, p)[source]
Returns the results of the multivariate log-gamma function with dimension p element-wise.
The mathematical calculation process of Mvlgamma is shown as follows:
where
and is the Gamma function.- Parameters
input (Tensor) – The input tensor of the multivariate log-gamma function, which must be one of the following types: float32, float64. The shape is
, where means any number of additional dimensions. And the value of any element in input must be greater than .p (int) – The number of dimensions. And the value of p must be greater than or equal to 1.
- Returns
Tensor, has the same shape and type as input.
- Raises
TypeError – If dtype of input is neither float32 nor float64.
TypeError – If p is not an int.
ValueError – If p is less than 1.
ValueError – If not all elements of input are greater than
.
- Supported Platforms:
Ascend
GPU
CPU
Examples
>>> import mindspore >>> import numpy as np >>> from mindspore import Tensor, ops >>> x = Tensor(np.array([[3, 4, 5], [4, 2, 6]]), mindspore.float32) >>> y = ops.mvlgamma(x, p=3) >>> print(y) [[2.694925 5.402975 9.140645] [5.402975 1.596312 13.64045]]