code: def take(data, indices, axis=0, out=None, mode='raise', blen=None, storage=None,
           create='array', **kwargs):
      
  
      # setup
      if out is not None:
          # argument is only there for numpy API compatibility
          raise NotImplementedError('out argument is not supported')
      length = len(data)
  
      if axis == 0:
  
          # check that indices are strictly increasing
          indices = np.asanyarray(indices)
          if np.any(indices[1:] <= indices[:-1]):
              raise NotImplementedError(
                  'indices must be strictly increasing'
              )
  
          # implement via compress()
          condition = np.zeros((length,), dtype=bool)
          condition[indices] = True
          return compress(condition, data, axis=0, blen=blen, storage=storage,
                          create=create, **kwargs)
  
      elif axis == 1:
  
          # setup
          storage = _util.get_storage(storage)
          blen = _util.get_blen_array(data, blen)
  
          # block iteration
          out = None
          for i in range(0, length, blen):
              j = min(i+blen, length)
              block = data[i:j]
              res = np.take(block, indices, axis=1, mode=mode)
              if out is None:
                  out = getattr(storage, create)(res, expectedlen=length,
                                                 **kwargs)
              else:
                  out.append(res)
          return out
  
      else:
          raise NotImplementedError('axis not supported: %s' % axis)
docs: Take elements from an array along an axis.