import unittest

import numpy as np



def 			__SCREAMING_SNAKE_CASE						(      __UpperCamelCase					: np.ndarray				,  __UpperCamelCase					: np.ndarray				,  __UpperCamelCase					: np.ndarray				,  __UpperCamelCase					: np.ndarray | None = None				,  )							->      np.ndarray:







  """simple docstring"""





  SCREAMING_SNAKE_CASE__    							=   np.shape(__UpperCamelCase			)
  SCREAMING_SNAKE_CASE__    							=   np.shape(__UpperCamelCase			)
  SCREAMING_SNAKE_CASE__    							=   np.shape(__UpperCamelCase			)

  if shape_a[0] != shape_b[0]:
    SCREAMING_SNAKE_CASE__    							=   (
        """Expected the same number of rows for A and B. """
        f"""Instead found A of size {shape_a} and B of size {shape_b}"""
    )
    raise ValueError(__UpperCamelCase			)

  if shape_b[1] != shape_c[1]:
    SCREAMING_SNAKE_CASE__    							=   (
        """Expected the same number of columns for B and C. """
        f"""Instead found B of size {shape_b} and C of size {shape_c}"""
    )
    raise ValueError(__UpperCamelCase			)

  SCREAMING_SNAKE_CASE__    							=   pseudo_inv
  if a_inv is None:
    try:
      SCREAMING_SNAKE_CASE__    							=   np.linalg.inv(__UpperCamelCase			)
    except np.linalg.LinAlgError:
      raise ValueError(
          """Input matrix A is not invertible. Cannot compute Schur complement."""			)

  return mat_c - mat_b.T @ a_inv @ mat_b







class __snake_case       (		unittest.TestCase	):




   def 			__a		(					self    :       int   ):



     """simple docstring"""






     SCREAMING_SNAKE_CASE__    							=   np.array([[1, 2, 1], [2, 1, 2], [3, 2, 4]]   )
     SCREAMING_SNAKE_CASE__    							=   np.array([[0, 3], [3, 0], [2, 3]]   )
     SCREAMING_SNAKE_CASE__    							=   np.array([[2, 1], [6, 3]]   )

     SCREAMING_SNAKE_CASE__    							=   schur_complement(_lowercase ,			_lowercase ,			_lowercase   )

     SCREAMING_SNAKE_CASE__    							=   np.block([[a, b], [b.T, c]]   )

     SCREAMING_SNAKE_CASE__    							=   np.linalg.det(_lowercase   )
     SCREAMING_SNAKE_CASE__    							=   np.linalg.det(_lowercase   )
     SCREAMING_SNAKE_CASE__    							=   np.linalg.det(_lowercase   )

     self.assertAlmostEqual(_lowercase ,			det_a * det_s   )




   def 			__a		(					self    :       str   ):



     """simple docstring"""






     SCREAMING_SNAKE_CASE__    							=   np.array([[1, 2, 1], [2, 1, 2], [3, 2, 4]]   )
     SCREAMING_SNAKE_CASE__    							=   np.array([[0, 3], [3, 0], [2, 3]]   )
     SCREAMING_SNAKE_CASE__    							=   np.array([[2, 1], [6, 3]]   )

     with self.assertRaises(_lowercase   ):
       schur_complement(_lowercase ,			_lowercase ,			_lowercase   )




   def 			__a		(					self    :       List[str]   ):



     """simple docstring"""






     SCREAMING_SNAKE_CASE__    							=   np.array([[1, 2, 1], [2, 1, 2], [3, 2, 4]]   )
     SCREAMING_SNAKE_CASE__    							=   np.array([[0, 3], [3, 0], [2, 3]]   )
     SCREAMING_SNAKE_CASE__    							=   np.array([[2, 1, 3], [6, 3, 5]]   )

     with self.assertRaises(_lowercase   ):
       schur_complement(_lowercase ,			_lowercase ,			_lowercase   )


if __name__ == "__main__":
   import doctest

   doctest.testmod()
   unittest.main()

from math import isqrt



def 			__SCREAMING_SNAKE_CASE						(      __UpperCamelCase					: int			)							->      bool:







  """simple docstring"""





  return all(number % divisor != 0 for divisor in range(2				,  isqrt(__UpperCamelCase			) + 1			)			)



def 			__SCREAMING_SNAKE_CASE						(      __UpperCamelCase					: int = 10**6			)							->      int:







  """simple docstring"""





  SCREAMING_SNAKE_CASE__    							=   0
  SCREAMING_SNAKE_CASE__    							=   1
  SCREAMING_SNAKE_CASE__    							=   7
  while prime_candidate < max_prime:
    primes_count += is_prime(__UpperCamelCase			)

    cube_index += 1
    prime_candidate += 6 * cube_index

  return primes_count


if __name__ == "__main__":
   print(F"""{solution() = }""")
