module documentation

Undocumented

Class TestLowlevelAPIAccess Undocumented
Class TestUfunc No class docstring; 0/2 class variable, 5/116 methods documented
Class TestUfuncGenericLoops Test generic loops.
Class TestUfuncKwargs Undocumented
Function test_addition_negative_zero Undocumented
Function test_addition_reduce_negative_zero Undocumented
Function test_reduce_casterrors Undocumented
Function test_trivial_loop_invalid_cast Undocumented
Function test_ufunc_input_casterrors Undocumented
Function test_ufunc_input_floatingpoint_error Undocumented
Function test_ufunc_methods_floaterrors Undocumented
Function test_ufunc_noncontiguous Check that contiguous and non-contiguous calls to ufuncs have the same results for values in range(9)
Function test_ufunc_out_casterrors Undocumented
Function test_ufunc_types Check all ufuncs that the correct type is returned. Avoid object and boolean types since many operations are not defined for for them.
Function test_ufunc_warn_with_nan Undocumented
Constant UNARY_OBJECT_UFUNCS Undocumented
Constant UNARY_UFUNCS Undocumented
Function _check_neg_zero Undocumented
Function _pickleable_module_global Undocumented
@pytest.mark.parametrize('dtype', np.typecodes['AllFloat'])
def test_addition_negative_zero(dtype): (source)

Undocumented

@pytest.mark.parametrize('dtype', np.typecodes['AllFloat'])
@pytest.mark.parametrize('use_initial', [True, False])
def test_addition_reduce_negative_zero(dtype, use_initial): (source)

Undocumented

@pytest.mark.skipif(not HAS_REFCOUNT, reason='Python lacks refcounts')
@pytest.mark.parametrize('offset', [0, np.BUFSIZE//2, int(1.5*np.BUFSIZE)])
def test_reduce_casterrors(offset): (source)

Undocumented

def test_trivial_loop_invalid_cast(): (source)

Undocumented

@pytest.mark.parametrize('bad_offset', [0, int(np.BUFSIZE*1.5)])
def test_ufunc_input_casterrors(bad_offset): (source)

Undocumented

@pytest.mark.skipif(IS_WASM, reason='fp errors don\'t work in wasm')
@pytest.mark.parametrize('bad_offset', [0, int(np.BUFSIZE*1.5)])
def test_ufunc_input_floatingpoint_error(bad_offset): (source)

Undocumented

@pytest.mark.skipif(IS_WASM, reason='fp errors don\'t work in wasm')
@pytest.mark.parametrize('method', [np.add.accumulate, np.add.reduce, pytest.param((lambda x: np.add.reduceat(x, [0])), id='reduceat'), pytest.param((lambda x: np.log.at(x, [2])), id='at')])
def test_ufunc_methods_floaterrors(method): (source)

Undocumented

@pytest.mark.parametrize('ufunc', [getattr(np, x) for x in dir(np) if isinstance(getattr(np, x), np.ufunc)])
@np._no_nep50_warning()
def test_ufunc_noncontiguous(ufunc): (source)

Check that contiguous and non-contiguous calls to ufuncs have the same results for values in range(9)

@pytest.mark.skipif(not HAS_REFCOUNT, reason='Python lacks refcounts')
def test_ufunc_out_casterrors(): (source)

Undocumented

@pytest.mark.parametrize('ufunc', [getattr(np, x) for x in dir(np) if isinstance(getattr(np, x), np.ufunc)])
def test_ufunc_types(ufunc): (source)

Check all ufuncs that the correct type is returned. Avoid object and boolean types since many operations are not defined for for them.

Choose the shape so even dot and matmul will succeed

@pytest.mark.parametrize('ufunc', [np.sign, np.equal])
def test_ufunc_warn_with_nan(ufunc): (source)

Undocumented

UNARY_OBJECT_UFUNCS = (source)

Undocumented

Value
[uf for uf in UNARY_UFUNCS if 'O->O' in uf.types]
UNARY_UFUNCS = (source)

Undocumented

Value
[obj for obj in np.core.umath.__dict__.values() if isinstance(obj, np.ufunc)]
def _check_neg_zero(value): (source)

Undocumented

def _pickleable_module_global(): (source)

Undocumented