code: def concatenate_1d(arrays):
      
      if len(arrays) == 0:
          return np.array([])
      if len(arrays) == 1:
          return np.asanyarray(arrays[0])
      if any(map(np.ma.is_masked, arrays)):
          return np.ma.concatenate(arrays)
      return np.concatenate(arrays)
docs: Concatenate 1D numpy arrays.
      Similar to np.concatenate but work with empty input and masked arrays.