MCPcopy Create free account
hub / github.com/numpy/numpy / put

Function put

numpy/ma/core.py:7262–7278  ·  view source on GitHub ↗

Set storage-indexed locations to corresponding values. This function is equivalent to `MaskedArray.put`, see that method for details. See Also -------- MaskedArray.put

(a, indices, values, mode='raise')

Source from the content-addressed store, hash-verified

7260
7261
7262def put(a, indices, values, mode='raise'):
7263 """
7264 Set storage-indexed locations to corresponding values.
7265
7266 This function is equivalent to `MaskedArray.put`, see that method
7267 for details.
7268
7269 See Also
7270 --------
7271 MaskedArray.put
7272
7273 """
7274 # We can't use 'frommethod', the order of arguments is different
7275 try:
7276 return a.put(indices, values, mode=mode)
7277 except AttributeError:
7278 return narray(a, copy=False).put(indices, values, mode=mode)
7279
7280
7281def putmask(a, mask, values): # , mode='raise'):

Callers 2

test_testMaPutMethod · 0.90
test_putMethod · 0.90

Calls 1

putMethod · 0.80

Tested by 2

test_testMaPutMethod · 0.72
test_putMethod · 0.72