class_docstr: This class tests the basic functionality of the Python bindings.
class_docstr_tok: ["This","class","tests","the","basic","functionality","of","the","Python","bindings","."]
docstr: Checks that an exception is thrown if the input matrix contains
  NaN values.
docstr_tok: ["Checks","that","an","exception","is","thrown","if","the","input","matrix","contains","NaN","values","."]
code: def testCheckInputMatricesNaN(self):
      """
      Checks that an exception is thrown if the input matrix contains
      NaN values.
      """
      x = np.random.rand(100, 5)
      a = np.random.randint(low=0, high=100)
      b = np.random.randint(low=0, high=5)
      x[a][b] = np.nan
      self.assertRaises(
          RuntimeError,
          lambda: test_python_binding(
              string_in="hello",
              int_in=12,
              double_in=4.0,
              mat_req_in=[[1.0]],
              col_req_in=[1.0],
              matrix_in=x,
              check_input_matrices=True,
          ),
      )
  
      x_vec = np.random.rand(100)
      a = np.random.randint(low=0, high=100)
      x_vec[a] = np.nan
      self.assertRaises(
          RuntimeError,
          lambda: test_python_binding(
              string_in="hello",
              int_in=12,
              double_in=4.0,
              mat_req_in=[[1.0]],
              col_req_in=[1.0],
              row_in=x_vec,
              check_input_matrices=True,
          ),
      )
  
      self.assertRaises(
          RuntimeError,
          lambda: test_python_binding(
              string_in="hello",
              int_in=12,
              double_in=4.0,
              mat_req_in=[[1.0]],
              col_req_in=[1.0],
              col_in=x_vec,
              check_input_matrices=True,
          ),
      )
  
      self.assertRaises(
          RuntimeError,
          lambda: test_python_binding(
              string_in="hello",
              int_in=12,
              double_in=4.0,
              mat_req_in=[[1.0]],
              col_req_in=[1.0],
              matrix_and_info_in=x,
              check_input_matrices=True,
          ),
      )
  
imports: import unittest
  import pandas
  import numpy
  import copy
  from mlpack.test_python_binding import test_python_binding
label_desc: Use image node_id 58 for calling the TestPythonBinding obj's underlying member method code with example usage: obj.testCheckInputMatricesNaN() without return types