code: def mtx_rot(ax, theta, reps=1):
      import numpy as np
      from scipy import linalg as spla
      from ..const import PRM
      if spla.norm(ax) < PRM.ZERO_VEC_TOL:
          raise ValueError("Norm of 'ax' is too small.")
      ax = make_nd_vec(ax, nd=3, t=np.float64, norm=True)
      if not np.isscalar(reps):
          raise ValueError("'reps' must be scalar.")
      if not np.issubdtype(type(reps), int):
          raise ValueError("'reps' must be an integer.")
      if not reps > 0:
          raise ValueError("'reps' must be a positive integer.")
      if not np.isscalar(theta):
          raise ValueError("'theta' must be scalar.")
      mod_lc = np.array([ [0, -ax[2], ax[1]],
                      [ax[2], 0, -ax[0]],
                      [-ax[1], ax[0], 0] ], dtype=np.float64)
      ax_oprod = np.dot(ax.reshape((3,1)), ax.reshape((1,3)))
      base_mtx = np.add(
                          np.add( (1.0 - np.cos(theta)) * ax_oprod,
                                              np.cos(theta) * np.eye(3)
                                ),
                          np.sin(theta) * mod_lc
                       )
      rot_mtx= spla.block_diag(*[base_mtx for i in range(reps)])
      return rot_mtx