module documentation

Undocumented

Constant MAY​_SHARE​_BOUNDS Undocumented
Constant MAY​_SHARE​_EXACT Undocumented
Variable ndims Undocumented
Variable shape Undocumented
Variable size Undocumented
Class ​Test​UFunc Test ufunc call memory overlap handling
Function ​_check​_assignment Check assignment arr[dstidx] = arr[srcidx] works.
Function ​_indices Returns ((axis0_src, axis0_dst), (axis1_src, axis1_dst), ... ) index pairs.
Function ​_indices​_for​_axis Returns (src, dst) pairs of indices.
Function ​_indices​_for​_nelems Returns slices of length nelems, from start onwards, in direction sign.
Function assert​_copy​_equivalent Check that operation(*args, out=out) produces results equivalent to out[...] = operation(*args, out=out.copy())
Function check​_internal​_overlap Undocumented
Function check​_may​_share​_memory​_easy​_fuzz Undocumented
Function check​_may​_share​_memory​_exact Undocumented
Function iter​_random​_view​_pairs Undocumented
Function test​_diophantine​_fuzz Undocumented
Function test​_diophantine​_overflow Undocumented
Function test​_internal​_overlap​_diophantine Undocumented
Function test​_internal​_overlap​_fuzz Undocumented
Function test​_internal​_overlap​_manual Undocumented
Function test​_internal​_overlap​_slices Undocumented
Function test​_may​_share​_memory​_bad​_max​_work Undocumented
Function test​_may​_share​_memory​_easy​_fuzz Undocumented
Function test​_may​_share​_memory​_harder​_fuzz Undocumented
Function test​_may​_share​_memory​_manual Undocumented
Function test​_non​_ndarray​_inputs Undocumented
Function test​_overlapping​_assignments Undocumented
Function test​_shares​_memory​_api Undocumented
Function view​_element​_first​_byte Construct an array viewing the first byte of each element of x
MAY_SHARE_BOUNDS: int =

Undocumented

Value
0
MAY_SHARE_EXACT: int =

Undocumented

Value
-1
ndims: int =

Undocumented

shape =

Undocumented

size: int =

Undocumented

def _check_assignment(srcidx, dstidx):
Check assignment arr[dstidx] = arr[srcidx] works.
def _indices(ndims):
Returns ((axis0_src, axis0_dst), (axis1_src, axis1_dst), ... ) index pairs.
def _indices_for_axis():
Returns (src, dst) pairs of indices.
def _indices_for_nelems(nelems):
Returns slices of length nelems, from start onwards, in direction sign.
def assert_copy_equivalent(operation, args, out, **kwargs):
Check that operation(*args, out=out) produces results equivalent to out[...] = operation(*args, out=out.copy())
def check_internal_overlap(a, manual_expected=None):

Undocumented

def check_may_share_memory_easy_fuzz(get_max_work, same_steps, min_count):

Undocumented

def check_may_share_memory_exact(a, b):

Undocumented

def iter_random_view_pairs(x, same_steps=True, equal_size=False):

Undocumented

@pytest.mark.slow
def test_diophantine_fuzz():

Undocumented

def test_diophantine_overflow():

Undocumented

def test_internal_overlap_diophantine():

Undocumented

def test_internal_overlap_fuzz():

Undocumented

def test_internal_overlap_manual():

Undocumented

def test_internal_overlap_slices():

Undocumented

def test_may_share_memory_bad_max_work():

Undocumented

@pytest.mark.slow
def test_may_share_memory_easy_fuzz():

Undocumented

@pytest.mark.slow
def test_may_share_memory_harder_fuzz():

Undocumented

def test_may_share_memory_manual():

Undocumented

def test_non_ndarray_inputs():

Undocumented

def test_overlapping_assignments():

Undocumented

def test_shares_memory_api():

Undocumented

def view_element_first_byte(x):
Construct an array viewing the first byte of each element of x