code: def _validate_number_sequence(self, seq, n):
          
          if seq is None:
              return np.zeros(n)
          if len(seq) is n:
              try:
                  l = [float(e) for e in seq]
              except ValueError:
                  raise ValueError("One or more elements in sequence <" + repr(seq) + "> cannot be interpreted as a real number")
              else:
                  return np.asarray(l)
          elif len(seq) is 0:
              return np.zeros(n)
          else:
              raise ValueError("Unexpected number of elements in sequence. Got: " + str(len(seq)) + ", Expected: " + str(n) + ".")
docs: Validate a sequence to be of a certain length and ensure it's a numpy array of floats.
  
          Raises:
              ValueError: Invalid length or non-numeric value