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

Function add_close

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

Source from the content-addressed store, hash-verified

3414 ''' using a context amanger and using nditer.close are equivalent
3415 '''
3416 def add_close(x, y, out=None):
3417 addop = np.add
3418 it = np.nditer([x, y, out], [],
3419 [['readonly'], ['readonly'], ['writeonly', 'allocate']])
3420 for (a, b, c) in it:
3421 addop(a, b, out=c)
3422 ret = it.operands[2]
3423 it.close()
3424 return ret
3425
3426 def add_context(x, y, out=None):
3427 addop = np.add

Callers 1

test_close_equivalentFunction · 0.85

Calls 1

closeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…