docstr: Test raising a matrix to an integer power works as expected.
docstr_tok: ["Test","raising","a","matrix","to","an","integer","power","works","as","expected","."]
code: def test_pow(self):
      """Test raising a matrix to an integer power works as expected."""
      m = matrix("1. 2.; 3. 4.")
      m2 = m.copy()
      m2 **= 2
      mi = m.copy()
      mi **= -1
      m4 = m2.copy()
      m4 **= 2
      assert_array_almost_equal(m2, m**2)
      assert_array_almost_equal(m4, np.dot(m2, m2))
      assert_array_almost_equal(np.dot(mi, m), np.eye(2))
  
imports: import collections.abc
  import numpy
  from numpy import matrix, asmatrix, bmat
  from numpy.testing import assert_, assert_equal, assert_almost_equal, assert_array_equal, assert_array_almost_equal, assert_raises
  from numpy.linalg import matrix_power
  from numpy.matrixlib import mat
label_desc: Use image node_id 2 for calling the TestAlgebra obj's underlying member method code with example usage: obj.test_pow() without return types