def do_flatten(obj):
      """Run flatten on either python list or numpy array."""
      if type(obj) == list:
        return np.array(obj).flatten()
      return obj.flatten()
Run flatten on either python list or numpy array.
gfootball/env/wrappers.py