code: def from_voigt(cls, voigt_input):
          
          voigt_input = np.array(voigt_input)
          rank = sum(voigt_input.shape) // 3
          t = cls(np.zeros([3] * rank))
          if voigt_input.shape != t._vscale.shape:
              raise ValueError("Invalid shape for voigt matrix")
          voigt_input = voigt_input / t._vscale
          this_voigt_map = t.get_voigt_dict(rank)
          for ind in this_voigt_map:
              t[ind] = voigt_input[this_voigt_map[ind]]
          return cls(t)
docs: Constructor based on the voigt notation vector or matrix.
  
          Args:
              voigt_input (array-like): voigt input for a given tensor