code: def vec_angle(vec1, vec2):
      import numpy as np
      from scipy import linalg as spla
      from ..const import PRM
      if len(vec1.shape) != 1:
          raise ValueError("'vec1' is not a vector")
      if len(vec2.shape) != 1:
          raise ValueError("'vec2' is not a vector")
      if vec1.shape[0] != vec2.shape[0]:
          raise ValueError("Vector lengths are not equal")
      if spla.norm(vec1) < PRM.ZERO_VEC_TOL:
          raise ValueError("'vec1' norm is too small")
      if spla.norm(vec2) < PRM.ZERO_VEC_TOL:
          raise ValueError("'vec2' norm is too small")
      dotp = np.dot(vec1, vec2) / spla.norm(vec1) / spla.norm(vec2)
      if dotp > 1:
          angle = 0.
      elif dotp < -1:
          angle = 180.
      else:
          angle = np.degrees(np.arccos(dotp))
      return angle