# cupy.linalg.slogdet¶

cupy.linalg.slogdet(a)[source]

Returns sign and logarithm of the determinant of an array.

It calculates the natural logarithm of the determinant of a given value.

Parameters: a (cupy.ndarray) – The input matrix with dimension (..., N, N). It returns a tuple (sign, logdet). sign represents each sign of the determinant as a real number 0, 1 or -1. ‘logdet’ represents the natural logarithm of the absolute of the determinant. If the determinant is zero, sign will be 0 and logdet will be -inf. The shapes of both sign and logdet are equal to a.shape[:-2]. tuple of ndarray

Warning

This function calls one or more cuSOLVER routine(s) which may yield invalid results if input conditions are not met. To detect these invalid results, you can set the linalg configuration to a value that is not ignore in cupyx.errstate() or cupyx.seterr().

Warning

To produce the same results as numpy.linalg.slogdet() for singular inputs, set the linalg configuration to raise.