code: def _as_array_or_item(data):
      
      data = np.asarray(data)
      if data.ndim == 0:
          if data.dtype.kind == 'M':
              data = np.datetime64(data, 'ns')
          elif data.dtype.kind == 'm':
              data = np.timedelta64(data, 'ns')
      return data
docs: Return the given values as a numpy array, or as an individual item if
      it's a 0d datetime64 or timedelta64 array.
  
      Importantly, this function does not copy data if it is already an ndarray -
      otherwise, it will not be possible to update Variable values in place.
  
      This function mostly exists because 0-dimensional ndarrays with
      dtype=datetime64 are broken :(
      https://github.com/numpy/numpy/issues/4337
      https://github.com/numpy/numpy/issues/7619
  
      TODO: remove this (replace with np.asarray) once these issues are fixed