docstr: Checks that if a non symmetric matrix is given to
  components_from_metric, an error is thrown
docstr_tok: ["Checks","that","if","a","non","symmetric","matrix","is","given","to","components_from_metric",",","an","error","is","thrown"]
code: def test_non_symmetric_matrix_raises(self):
      """Checks that if a non symmetric matrix is given to
      components_from_metric, an error is thrown"""
      rng = np.random.RandomState(42)
      M = rng.randn(10, 10)
      with pytest.raises(ValueError) as raised_error:
          components_from_metric(M)
      assert (
          str(raised_error.value)
          == "The input metric should be symmetric."
      )
  
imports: import unittest
  import numpy
  import pytest
  from scipy.stats import ortho_group
  from sklearn.datasets import load_iris
  from numpy.testing import assert_array_almost_equal, assert_allclose
  from metric_learn.sklearn_shims import ignore_warnings
  from metric_learn import LMNN, NCA, LFDA, Covariance, MLKR, LSML_Supervised, ITML_Supervised, SDML_Supervised, RCA_Supervised
  from metric_learn._util import components_from_metric
  from metric_learn.exceptions import NonPSDError
label_desc: Use image node_id 12 for calling the TestTransformerMetricConversion obj's underlying member method code with example usage: obj.test_non_symmetric_matrix_raises() without return types