code: def test_burkardt_1(self):
      # This matrix is diagonal.
      # The calculation of the matrix exponential is simple.
      #
      # This is the first of a series of matrix exponential tests
      # collected by John Burkardt from the following sources.
      #
      # Alan Laub,
      # Review of "Linear System Theory" by Joao Hespanha,
      # SIAM Review,
      # Volume 52, Number 4, December 2010, pages 779--781.
      #
      # Cleve Moler and Charles Van Loan,
      # Nineteen Dubious Ways to Compute the Exponential of a Matrix,
      # Twenty-Five Years Later,
      # SIAM Review,
      # Volume 45, Number 1, March 2003, pages 3--49.
      #
      # Cleve Moler,
      # Cleve's Corner: A Balancing Act for the Matrix Exponential,
      # 23 July 2012.
      #
      # Robert Ward,
      # Numerical computation of the matrix exponential
      # with accuracy estimate,
      # SIAM Journal on Numerical Analysis,
      # Volume 14, Number 4, September 1977, pages 600--610.
      exp1 = np.exp(1)
      exp2 = np.exp(2)
      A = np.array(
          [
              [1, 0],
              [0, 2],
          ],
          dtype=float,
      )
      desired = np.array(
          [
              [exp1, 0],
              [0, exp2],
          ],
          dtype=float,
      )
      actual = expm(A)
      assert_allclose(actual, desired)
  
imports: from __future__ import division, print_function, absolute_import
  import math
  import numpy
  from numpy import array, eye, exp, random
  from numpy.linalg import matrix_power
  from numpy.testing import assert_allclose, assert_, assert_array_almost_equal, assert_equal, assert_array_almost_equal_nulp
  from scipy._lib._numpy_compat import suppress_warnings
  from scipy.sparse import csc_matrix, SparseEfficiencyWarning
  from scipy.sparse.construct import eye
  from scipy.sparse.linalg.matfuncs import expm, _expm, ProductOperator, MatrixPowerOperator, _onenorm_matrix_power_nnm
  from scipy.sparse.sputils import matrix
  from scipy.linalg import logm
  from scipy.special import factorial, binom
  import scipy.sparse
  import scipy.sparse.linalg
label_desc: Use image node_id 14 for calling the TestExpM obj's underlying member method code with example usage: obj.test_burkardt_1() without return types