def put(a, ind, v): """put(a, ind, v) results in a[n] = v[n] for all n in ind If v is shorter than mask it will be repeated as necessary. In particular v can be a scalar or length 1 array. The routine put is the equivalent of the following (although the loop is in C for speed): ind = array(indices, copy=0) v = array(values, copy=0).astype(a, typecode()) for i in ind: a.flat[i] = v[i] a must be a contiguous Numeric array. """ multiarray.put(a, ind, array(v, copy=0).astype(a.typecode()))
def put (a, ind, v): """put(a, ind, v) results in a[n] = v[n] for all n in ind If v is shorter than mask it will be repeated as necessary. In particular v can be a scalar or length 1 array. The routine put is the equivalent of the following (although the loop is in C for speed): ind = array(indices, copy=0) v = array(values, copy=0).astype(a, typecode()) for i in ind: a.flat[i] = v[i] a must be a contiguous Numeric array. """ multiarray.put (a, ind, array(v, copy=0).astype(a.typecode()))
"""Numeric module defining a multi-dimensional array and useful procedures for