#NEWLINE# def det( a ) : #NEWLINE# #INDENT# 'Computes the determinant of a single square matrix.\n\n    Args:\n        a (Variable): Input array to compute the determinant for.\n\n    Returns:\n        ~chainer.Variable: Scalar determinant of the matrix a.\n\n    ' #NEWLINE# shape = ( 1 , len ( a . data ) , a . data . shape [ 1 ] ) #NEWLINE# batched_a = reshape . Reshape ( shape ) ( a ) #NEWLINE# batched_det = BatchDet ( ) ( batched_a ) #NEWLINE# return reshape . Reshape ( ( ) ) ( batched_det )