Computes the determinant of an ndarray