class_docstr: This class defines tests for the to_matrix() and to_matrix_with_info() utility
  functions.
docstr: Make sure we can convert a numpy matrix without copying anything.
docstr_tok: ["Make","sure","we","can","convert","a","numpy","matrix","without","copying","anything","."]
code: def testNumpyToMatrix(self):
      """
      Make sure we can convert a numpy matrix without copying anything.
      """
      m1 = np.random.randn(100, 5)
      m2, _, dims = to_matrix_with_info(m1, np.double)
  
      self.assertTrue(isinstance(m2, np.ndarray))
      self.assertEqual(m2.dtype, np.dtype(np.double))
  
      p1 = m1.__array_interface__
      p2 = m2.__array_interface__
  
      self.assertEqual(p1["data"], p2["data"])
  
      self.assertEqual(dims.shape[0], 5)
      self.assertEqual(dims[0], 0)
      self.assertEqual(dims[1], 0)
      self.assertEqual(dims[2], 0)
      self.assertEqual(dims[3], 0)
      self.assertEqual(dims[4], 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 6 for calling the TestToMatrixWithInfo obj's underlying member method code with example usage: obj.testNumpyToMatrix() without return types