結果 : how to check if matrix is empty python