class_docstr: This class defines tests for the to_matrix() and to_matrix_with_info() utility
  functions.
docstr: Test that a matrix with one int and one double feature are transformed
  correctly.
docstr_tok: ["Test","that","a","matrix","with","one","int","and","one","double","feature","are","transformed","correctly","."]
code: def testPandasMixedToMatrix(self):
      """
      Test that a matrix with one int and one double feature are transformed
      correctly.
      """
      d = pd.DataFrame({"a": range(50)})
      d["b"] = np.random.randn(50, 1)
      self.assertTrue(
          (d["a"].dtype == np.dtype("int32"))
          or (d["a"].dtype == np.dtype("int64"))
      )
      self.assertEqual(d["b"].dtype, np.dtype(np.double))
  
      m, _, dims = to_matrix_with_info(d, np.double)
  
      self.assertTrue(isinstance(m, np.ndarray))
      self.assertEqual(m.dtype, np.dtype(np.double))
      self.assertEqual(m.shape[0], 50)
      self.assertEqual(m.shape[1], 2)
      colNames = list("ab")
      for i in range(2):
          for j in range(50):
              self.assertEqual(d[colNames[i]][j], m[j, i])
  
      self.assertEqual(dims.shape[0], 2)
      self.assertEqual(dims[0], 0)
      self.assertEqual(dims[1], 0)
  
imports: import unittest
  import pandas
  import numpy
  from mlpack.matrix_utils import to_matrix
  from mlpack.matrix_utils import to_matrix_with_info
label_desc: Use image node_id 3 for calling the TestToMatrixWithInfo obj's underlying member method code with example usage: obj.testPandasMixedToMatrix() without return types