module documentation
Undocumented
@pytest.mark.skipif( IS_WASM, reason='Cannot start subprocess')
@pytest.mark.skipif( not HAS_REFCOUNT, reason='PyPy seems to not hit this.')
def test_buffered_cast_error_paths_unraisable(): (source) ¶
@pytest.mark.skipif(
def test_buffered_cast_error_paths_unraisable(): (source) ¶
Undocumented
Matches the expected output of a debug print with the actual output. Note that the iterator dump should not be considered stable API, this test is mainly to ensure the print does not crash.
Currently uses a subprocess to avoid dealing with the C level `printf`s.
@pytest.mark.parametrize( 'dtype', np.typecodes[ 'All'])
@pytest.mark.parametrize( 'loop_dtype', np.typecodes[ 'All'])
@pytest.mark.filterwarnings( 'ignore::numpy.ComplexWarning')
def test_iter_copy_casts(dtype, loop_dtype): (source) ¶
@pytest.mark.parametrize(
@pytest.mark.filterwarnings(
def test_iter_copy_casts(dtype, loop_dtype): (source) ¶
Undocumented
@pytest.mark.skipif( not HAS_REFCOUNT, reason='Python lacks refcounts')
def test_iter_refcount(): (source) ¶
def test_iter_refcount(): (source) ¶
Undocumented
@pytest.mark.parametrize( 'a', [ np.zeros( ( 3), dtype='f8'), np.zeros( ( 9876, 3*5), dtype='f8')[ ::2, :], np.zeros( ( 4, 312, 124, 3), dtype='f8')[ ::2, :, ::2, :], np.zeros( ( 9), dtype='f8')[ ::3], np.zeros( ( 9876, 3*10), dtype='f8')[ ::2, ::5], np.zeros( ( 4, 312, 124, 3), dtype='f8')[ ::2, :, ::2, ::-1]])
def test_iter_writemasked(a): (source) ¶
def test_iter_writemasked(a): (source) ¶
Undocumented
@pytest.mark.parametrize( [ 'mask', 'mask_axes'], [ ( None, [ -1, 0]), ( np.zeros( ( 1, 4), dtype='bool'), [ 0, 1]), ( np.zeros( ( 1, 4), dtype='bool'), None), ( np.zeros( 4, dtype='bool'), [ -1, 0]), ( np.zeros( (), dtype='bool'), [ -1, -1]), ( np.zeros( (), dtype='bool'), None)])
def test_iter_writemasked_broadcast_error(mask, mask_axes): (source) ¶
def test_iter_writemasked_broadcast_error(mask, mask_axes): (source) ¶
Undocumented
@pytest.mark.skipif( not HAS_REFCOUNT, reason='Python lacks refcounts')
def test_nditer_multi_index_set_refcount(): (source) ¶
def test_nditer_multi_index_set_refcount(): (source) ¶
Undocumented
@pytest.mark.parametrize( 'arr', [ np.ones( ( 8000, 4, 2), dtype=object)[ :, ::2, :], np.ones( ( 8000, 4, 2), dtype=object, order='F')[ :, ::2, :], np.ones((8000, 4, 2), dtype=object)[:, ::2, :].copy( 'F')])
def test_object_iter_cleanup_large_reduce(arr): (source) ¶
def test_object_iter_cleanup_large_reduce(arr): (source) ¶
Undocumented
@pytest.mark.skipif( (sys.version_info[:2] == (3, 9)) and (sys.platform == 'win32'), reason='Errors with Python 3.9 on Windows')
@pytest.mark.parametrize( [ 'in_dtype', 'buf_dtype'], [ ( 'i', 'O'), ( 'O', 'i'), ( 'i,O', 'O,O'), ( 'O,i', 'i,O')])
@pytest.mark.parametrize( 'steps', [ 1, 2, 3])
def test_partial_iteration_cleanup(in_dtype, buf_dtype, steps): (source) ¶
@pytest.mark.parametrize(
@pytest.mark.parametrize(
def test_partial_iteration_cleanup(in_dtype, buf_dtype, steps): (source) ¶
Checks for reference counting leaks during cleanup. Using explicit reference counts lead to occasional false positives (at least in parallel test setups). This test now should still test leaks correctly when run e.g. with pytest-valgrind or pytest-leaks
@pytest.mark.skipif( not HAS_REFCOUNT, reason='Python lacks refcounts')
@pytest.mark.parametrize( [ 'in_dtype', 'buf_dtype'], [ ( 'O', 'i'), ( 'O,i', 'i,O')])
def test_partial_iteration_error(in_dtype, buf_dtype): (source) ¶
@pytest.mark.parametrize(
def test_partial_iteration_error(in_dtype, buf_dtype): (source) ¶
Undocumented