put(self, indices, values, mode='raise')
Sets self._data.flat[n] = values[n] for each n in indices. If :None:None:`values`
is shorter than indices
then it will repeat. If :None:None:`values`
has some masked values, the initial mask is updated in consequence, else the corresponding values are unmasked.
:None:None:`values`
can be a scalar or length 1 array.
Target indices, interpreted as integers.
Values to place in self._data copy at target indices.
Specifies how out-of-bounds indices will behave. 'raise' : raise an error. 'wrap' : wrap around. 'clip' : clip to the range.
Set storage-indexed locations to corresponding values.
>>> x = np.ma.array([[1,2,3],[4,5,6],[7,8,9]], mask=[0] + [1,0]*4)This example is valid syntax, but we were not able to check execution
... x masked_array( data=[[1, --, 3], [--, 5, --], [7, --, 9]], mask=[[False, True, False], [ True, False, True], [False, True, False]], fill_value=999999)
>>> x.put([0,4,8],[10,20,30])This example is valid syntax, but we were not able to check execution
... x masked_array( data=[[10, --, 3], [--, 20, --], [7, --, 30]], mask=[[False, True, False], [ True, False, True], [False, True, False]], fill_value=999999)
>>> x.put(4,999)See :
... x masked_array( data=[[10, --, 3], [--, 999, --], [7, --, 30]], mask=[[False, True, False], [ True, False, True], [False, True, False]], fill_value=999999)
The following pages refer to to this document either explicitly or contain code examples using this.
numpy.ma.core.put
Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.
Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)
SVG is more flexible but power hungry; and does not scale well to 50 + nodes.
All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them