Copy `data` block-wise into `arr`.
774386
def store(data, arr, start=0, stop=None, offset=0, blen=None):
    """"""

    # setup
    blen = _util.get_blen_array(data, blen)
    if stop is None:
        stop = len(data)
    else:
        stop = min(stop, len(data))
    length = stop - start
    if length < 0:
        raise ValueError('invalid stop/start')

    # copy block-wise
    for bi in range(start, stop, blen):
        bj = min(bi+blen, stop)
        bl = bj - bi
        arr[offset:offset+bl] = data[bi:bj]
        offset += bl
1286677
def blockgen(bytes, block_size=16):
    '''  '''
    for i in range(0, len(bytes), block_size):
        block = bytes[i:i + block_size]
        block_len = len(block)
        if block_len > 0:
            yield block
        if block_len < block_size:
            break
1352924
def bytes_to_char(arr):
    """"""
    if arr.dtype.kind != 'S':
        raise ValueError('argument must have a fixed-width bytes dtype')

    if isinstance(arr, dask_array_type):
        import dask.array as da
        return da.map_blocks(_numpy_bytes_to_char, arr,
                             dtype='S1',
                             chunks=arr.chunks + ((arr.dtype.itemsize,)),
                             new_axis=[arr.ndim])
    else:
        return _numpy_bytes_to_char(arr)
1243992
def apply(self, arr):
        """"""
        for t in self.cpu_transforms:
            arr = t.apply(arr)
        return arr
1109135
public void copyTo(int srcOffs, byte[] dst, int offs, int len) {
        arraycopy(bytes, srcOffs, dst, offs, len);
    }
736472
function copy(out, a) {
  out[0] = a[0]
  out[1] = a[1]
  out[2] = a[2]
  out[3] = a[3]
  return out
}
523397
def some(arr):
    """"""
    return functools.reduce(lambda x, y: x or (y is not None), arr, False)
1303045
def fill(*args, &block)
      ary = self.to_a
      ary.fill *args, &block
      self.replace ary
    end
1083857
function rm(arr, index) {
	var len = arr.length
	for (var i=index+1; i<len; i++) {arr[i - 1] = arr[i]}
	arr.pop()
}
656348
void copyBlocksTo(RegularFile target, int count) {
    int start = blockCount - count;
    int targetEnd = target.blockCount + count;
    target.expandIfNecessary(targetEnd);

    System.arraycopy(this.blocks, start, target.blocks, target.blockCount, count);
    target.blockCount = targetEnd;
  }
335434
def _return(self, ary):
        
        if isinstance(ary, Array):
            return ary
        return Array(ary, copy=False)
746069
function flatten (arr) {
  return arr.reduce(function (acc, curr) {
    return acc.concat(Array.isArray(curr) ? flatten(curr) : curr)
  }, [])
}
441389
public static String[] copyArrayAddFirst(String[] arr, String add) {
        String[] arrCopy = new String[arr.length + 1];
        arrCopy[0] = add;
        System.arraycopy(arr, 0, arrCopy, 1, arr.length);
        return arrCopy;
    }
1221175
private static int put(byte[] block, int offset, byte[] b, int off, int len) {
    System.arraycopy(b, off, block, offset, len);
    return len;
  }
32147
def extract_arj (archive, compression, cmd, verbosity, interactive, outdir):
    """"""
    cmdlist = [cmd, 'x', '-r']
    if not interactive:
        cmdlist.append('-y')
    cmdlist.extend([archive, outdir])
    return cmdlist
1104505
def copy(self, deep=True):
        
        values = self.values
        if deep:
            values = values.copy()
        return self.make_block_same_class(values, ndim=self.ndim)
850268
def move_to(self, r):
        '''
        '''
        dx = r - self.r_array[0]
        self.r_array += dx