class documentation
class TestTypes: (source)
Undocumented
Method | check |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Metadata handling in promotion does not appear formalized right now in NumPy. This test should thus be considered to document behaviour, rather than test the correct definition of it. |
Method | test |
Undocumented |
Method | test |
Undocumented |
Method | test |
Undocumented |
@pytest.mark.parametrize( [ 'dtype1', 'dtype2'], [ [ np.dtype( 'V6'), np.dtype( 'V10')], [ np.dtype( [ ( 'name1', 'i8')]), np.dtype( [ ( 'name2', 'i8')])]])
def test_invalid_void_promotion(self, dtype1, dtype2): (source) ¶
def test_invalid_void_promotion(self, dtype1, dtype2): (source) ¶
Undocumented
@pytest.mark.parametrize( 'dtype', list( np.typecodes[ 'All'])+[ 'i,i', '10i', 'S3', 'S100', 'U3', 'U100', rational])
def test_promote_identical_types_metadata(self, dtype): (source) ¶
def test_promote_identical_types_metadata(self, dtype): (source) ¶
Undocumented
@pytest.mark.slow
@pytest.mark.filterwarnings( 'ignore:Promotion of numbers:FutureWarning')
@pytest.mark.parametrize( [ 'dtype1', 'dtype2'], itertools.product( list( np.typecodes[ 'All'])+[ 'i,i', 'S3', 'S100', 'U3', 'U100', rational], repeat=2))
def test_promote_types_metadata(self, dtype1, dtype2): (source) ¶
@pytest.mark.filterwarnings(
@pytest.mark.parametrize(
def test_promote_types_metadata(self, dtype1, dtype2): (source) ¶
Metadata handling in promotion does not appear formalized right now in NumPy. This test should thus be considered to document behaviour, rather than test the correct definition of it.
This test is very ugly, it was useful for rewriting part of the promotion, but probably should eventually be replaced/deleted (i.e. when metadata handling in promotion is better defined).
@pytest.mark.parametrize( 'swap', [ '', 'swap'])
@pytest.mark.parametrize( 'string_dtype', [ 'U', 'S'])
def test_promote_types_strings(self, swap, string_dtype): (source) ¶
@pytest.mark.parametrize(
def test_promote_types_strings(self, swap, string_dtype): (source) ¶
Undocumented
@pytest.mark.parametrize( [ 'dtype1', 'dtype2'], [ [ np.dtype( 'V10'), np.dtype( 'V10')], [ np.dtype( [ ( 'name1', 'i8')]), np.dtype( [ ( 'name1', np.dtype('i8').newbyteorder())])], [ np.dtype( 'i8,i8'), np.dtype( 'i8,>i8')], [ np.dtype( 'i8,i8'), np.dtype( 'i4,i4')]])
def test_valid_void_promotion(self, dtype1, dtype2): (source) ¶
def test_valid_void_promotion(self, dtype1, dtype2): (source) ¶
Undocumented