module documentation

Undocumented

Function test_array_array Undocumented
Function test_array_astype Undocumented
Function test_array_astype_to_string_discovery_empty Undocumented
Function test_array_astype_to_void Undocumented
Function test_array_astype_warning Undocumented
Function test_array_impossible_casts Undocumented
Function test_astype_copyflag Undocumented
Function test_broadcast_arrays Undocumented
Function test_contiguous_flags Undocumented
Function test_copy_order Undocumented
Function test_copyto Undocumented
Function test_copyto_fromscalar Undocumented
Function test_copyto_permut Undocumented
Function test_fastCopyAndTranspose Undocumented
Function test_full_from_list Undocumented
Function test_none_to_nan_cast Undocumented
Function test_object_array_astype_to_void Undocumented
Function test_string_to_boolean_cast Currently, for astype strings are cast to booleans effectively by calling bool(int(string). This is not consistent (see gh-9875) and will eventually be deprecated.
Function test_string_to_boolean_cast_errors These currently error out, since cast to integers fails, but should not error out in the future.
Function test_string_to_complex_cast Undocumented
def test_array_array(): (source)

Undocumented

def test_array_astype(): (source)

Undocumented

@pytest.mark.parametrize('dt', ['S', 'U'])
def test_array_astype_to_string_discovery_empty(dt): (source)

Undocumented

@pytest.mark.parametrize('dt', ['d', 'f', 'S13', 'U32'])
def test_array_astype_to_void(dt): (source)

Undocumented

@pytest.mark.parametrize('t', (np.sctypes['uint']+np.sctypes['int'])+np.sctypes['float'])
def test_array_astype_warning(t): (source)

Undocumented

@pytest.mark.parametrize('array', [True, False])
def test_array_impossible_casts(array): (source)

Undocumented

def test_astype_copyflag(): (source)

Undocumented

def test_broadcast_arrays(): (source)

Undocumented

def test_contiguous_flags(): (source)

Undocumented

def test_copy_order(): (source)

Undocumented

def test_copyto(): (source)

Undocumented

def test_copyto_fromscalar(): (source)

Undocumented

def test_copyto_permut(): (source)

Undocumented

@pytest.mark.parametrize('a', (np.array(2), np.array([3, 2, 7, 0]), np.arange(6).reshape(2, 3)))
def test_fastCopyAndTranspose(a): (source)

Undocumented

@pytest.mark.parametrize(['shape', 'fill_value', 'expected_output'], [((2, 2), [5.0, 6.0], np.array([[5.0, 6.0], [5.0, 6.0]])), ((3, 2), [1.0, 2.0], np.array([[1.0, 2.0], [1.0, 2.0], [1.0, 2.0]]))])
def test_full_from_list(shape, fill_value, expected_output): (source)

Undocumented

@pytest.mark.parametrize('dtype', np.typecodes['AllFloat'])
def test_none_to_nan_cast(dtype): (source)

Undocumented

def test_object_array_astype_to_void(): (source)

Undocumented

@pytest.mark.parametrize(['dtype', 'out_dtype'], [(np.bytes_, np.bool_), (np.unicode_, np.bool_), (np.dtype('S10,S9'), np.dtype('?,?'))])
def test_string_to_boolean_cast(dtype, out_dtype): (source)

Currently, for astype strings are cast to booleans effectively by calling bool(int(string). This is not consistent (see gh-9875) and will eventually be deprecated.

@pytest.mark.parametrize(['dtype', 'out_dtype'], [(np.bytes_, np.bool_), (np.unicode_, np.bool_), (np.dtype('S10,S9'), np.dtype('?,?'))])
def test_string_to_boolean_cast_errors(dtype, out_dtype): (source)

These currently error out, since cast to integers fails, but should not error out in the future.

@pytest.mark.parametrize('str_type', [str, bytes, np.str_, np.unicode_])
@pytest.mark.parametrize('scalar_type', [np.complex64, np.complex128, np.clongdouble])
def test_string_to_complex_cast(str_type, scalar_type): (source)

Undocumented