code: def _asfarray(x):
      """
      Convert to array with floating or complex dtype.
  
      float16 values are also promoted to float32.
      """
      if not hasattr(x, "dtype"):
          x = np.asarray(x)
  
      if x.dtype == np.float16:
          return np.asarray(x, np.float32)
      elif x.dtype.kind not in "fc":
          return np.asarray(x, np.float64)
  
      # Require native byte order
      dtype = x.dtype.newbyteorder("=")
      # Always align input
      copy = not x.flags["ALIGNED"]
      return np.array(x, dtype=dtype, copy=copy)
  
file_path: scipy/scipy/fft/_pocketfft/helper.py
imports: from numbers import Number
  import operator
  import os
  import threading
  import contextlib
  import numpy
  from .pypocketfft import good_size
label_desc: Use image node_id 3 for calling a global function with example usage: _asfarray(x) and returns: np, np, np