code: def pass_for_numeric_dtypes_or_raise_array(x):
      
      try:
          if isinstance(x, (pd.Series, pd.DataFrame)):
              v = pd.to_numeric(x.squeeze())
          else:
              v = pd.to_numeric(np.asarray(x).squeeze())
  
          if v.size == 0:
              raise ValueError("Empty array/Series passed in.")
          return v
  
      except:
          raise ValueError("Values must be numeric: no strings, datetimes, objects, etc.")
docs: Use the utility `to_numeric` to check that x is convertible to numeric values, and then convert. Any errors
      are reported back to the user.
  
      Parameters
      ----------
      x: list, array, Series, DataFrame
  
      Notes
      ------
      This actually allows objects like timedeltas (converted to microseconds), and strings as numbers.