MCPcopy Index your code
hub / github.com/numpy/numpy / add_context

Function add_context

numpy/_core/tests/test_nditer.py:3426–3433  ·  view source on GitHub ↗
(x, y, out=None)

Source from the content-addressed store, hash-verified

3424 return ret
3425
3426 def add_context(x, y, out=None):
3427 addop = np.add
3428 it = np.nditer([x, y, out], [],
3429 [['readonly'], ['readonly'], ['writeonly', 'allocate']])
3430 with it:
3431 for (a, b, c) in it:
3432 addop(a, b, out=c)
3433 return it.operands[2]
3434 z = add_close(range(5), range(5))
3435 assert_equal(z, range(0, 10, 2))
3436 z = add_context(range(5), range(5))

Callers 1

test_close_equivalentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…