larray.Array.set
- Array.set(value, **kwargs) None [source]
Set a subset of array to value.
all common axes must be either of length 1 or the same length
extra axes in value must be of length 1
extra axes in current array can have any length
- Parameters
- valuescalar or Array
Examples
>>> arr = ndtest((3, 3)) >>> arr a\b b0 b1 b2 a0 0 1 2 a1 3 4 5 a2 6 7 8 >>> arr['a1:', 'b1:'].set(10) >>> arr a\b b0 b1 b2 a0 0 1 2 a1 3 10 10 a2 6 10 10 >>> arr['a1:', 'b1:'].set(ndtest("a=a1,a2;b=b1,b2")) >>> arr a\b b0 b1 b2 a0 0 1 2 a1 3 0 1 a2 6 2 3