code: def matrix_power(x: Array, n: int, /) -> Array:
      """
      Array API compatible wrapper for :py:func:`np.matrix_power <numpy.matrix_power>`.
  
      See its docstring for more information.
      """
      # Note: the restriction to floating-point dtypes only is different from
      # np.linalg.matrix_power.
      if x.dtype not in _floating_dtypes:
          raise TypeError(
              "Only floating-point dtypes are allowed for the first argument of matrix_power"
          )
  
      # np.matrix_power already checks if n is an integer
      return Array._new(np.linalg.matrix_power(x._array, n))
  
imports: from __future__ import annotations
  import functools
  from ._dtypes import _floating_dtypes, _numeric_dtypes
  from ._manipulation_functions import reshape
  from ._array_object import Array
  from .._core.internal import _normalize_axis_indices
  from typing import TYPE_CHECKING
  from typing import NamedTuple
  import cupy
label_desc: Use image node_id 10 for calling a global function with example usage: matrix_power() and returns: Array