cf.Data.__setitem__ΒΆ

Data.__setitem__(indices, value)[source]ΒΆ

Implement indexed assignment.

x.__setitem__(indices, y) <==> x[indices]=y

Assignment to data array elements defined by indices.

Elements of a data array may be changed by assigning values to a subspace. See __getitem__ for details on how to define subspace of the data array.

Missing data

The treatment of missing data elements during assignment to a subspace depends on the value of the hardmask attribute. If it is True then masked elements will not be unmasked, otherwise masked elements may be set to any value.

In either case, unmasked elements may be set, (including missing data).

Unmasked elements may be set to missing data by assignment to the cf.masked constant or by assignment to a value which contains masked elements.

See also

cf.masked, hardmask, where

Examples: