code: def _unconvert_string_array(data, nan_rep=None, encoding=None,
                              errors='strict'):
      
      shape = data.shape
      data = np.asarray(data.ravel(), dtype=object)
  
      # guard against a None encoding (because of a legacy
      # where the passed encoding is actually None)
      encoding = _ensure_encoding(encoding)
      if encoding is not None and len(data):
  
          itemsize = libwriters.max_len_string_array(ensure_object(data))
          dtype = "U{0}".format(itemsize)
  
          if isinstance(data[0], bytes):
              data = Series(data).str.decode(encoding, errors=errors).values
          else:
              data = data.astype(dtype, copy=False).astype(object, copy=False)
  
      if nan_rep is None:
          nan_rep = 'nan'
  
      data = libwriters.string_array_replace_from_nan_rep(data, nan_rep)
      return data.reshape(shape)
docs: inverse of _convert_string_array
  
      Parameters
      ----------
      data : fixed length string dtyped array
      nan_rep : the storage repr of NaN, optional
      encoding : the encoding of the data, optional
      errors : handler for encoding errors, default 'strict'
  
      Returns
      -------
      an object array of the decoded data