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

Function arrays_overlap

numpy/core/src/common/array_assign.c:154–166  ·  view source on GitHub ↗

Returns 1 if the arrays have overlapping data, 0 otherwise */

Source from the content-addressed store, hash-verified

152
153/* Returns 1 if the arrays have overlapping data, 0 otherwise */
154NPY_NO_EXPORT int
155arrays_overlap(PyArrayObject *arr1, PyArrayObject *arr2)
156{
157 mem_overlap_t result;
158
159 result = solve_may_share_memory(arr1, arr2, NPY_MAY_SHARE_BOUNDS);
160 if (result == MEM_OVERLAP_NO) {
161 return 0;
162 }
163 else {
164 return 1;
165 }
166}

Callers 5

PyArray_TakeFromFunction · 0.85
PyArray_PutToFunction · 0.85
PyArray_PutMaskFunction · 0.85
PyArray_ChooseFunction · 0.85
PyArray_AssignArrayFunction · 0.85

Calls 1

solve_may_share_memoryFunction · 0.85

Tested by

no test coverage detected