@@ -13,64 +13,64 @@ def test_convert_sql_column_floats(self):
1313 arr = np .array ([1.5 , None , 3 , 4.2 ], dtype = object )
1414 result = lib .convert_sql_column (arr )
1515 expected = np .array ([1.5 , np .nan , 3 , 4.2 ], dtype = 'f8' )
16- self .assert_numpy_array_equal (result , expected )
16+ tm .assert_numpy_array_equal (result , expected )
1717
1818 def test_convert_sql_column_strings (self ):
1919 arr = np .array (['1.5' , None , '3' , '4.2' ], dtype = object )
2020 result = lib .convert_sql_column (arr )
2121 expected = np .array (['1.5' , np .nan , '3' , '4.2' ], dtype = object )
22- self .assert_numpy_array_equal (result , expected )
22+ tm .assert_numpy_array_equal (result , expected )
2323
2424 def test_convert_sql_column_unicode (self ):
2525 arr = np .array ([u ('1.5' ), None , u ('3' ), u ('4.2' )],
2626 dtype = object )
2727 result = lib .convert_sql_column (arr )
2828 expected = np .array ([u ('1.5' ), np .nan , u ('3' ), u ('4.2' )],
2929 dtype = object )
30- self .assert_numpy_array_equal (result , expected )
30+ tm .assert_numpy_array_equal (result , expected )
3131
3232 def test_convert_sql_column_ints (self ):
3333 arr = np .array ([1 , 2 , 3 , 4 ], dtype = 'O' )
3434 arr2 = np .array ([1 , 2 , 3 , 4 ], dtype = 'i4' ).astype ('O' )
3535 result = lib .convert_sql_column (arr )
3636 result2 = lib .convert_sql_column (arr2 )
3737 expected = np .array ([1 , 2 , 3 , 4 ], dtype = 'i8' )
38- self .assert_numpy_array_equal (result , expected )
39- self .assert_numpy_array_equal (result2 , expected )
38+ tm .assert_numpy_array_equal (result , expected )
39+ tm .assert_numpy_array_equal (result2 , expected )
4040
4141 arr = np .array ([1 , 2 , 3 , None , 4 ], dtype = 'O' )
4242 result = lib .convert_sql_column (arr )
4343 expected = np .array ([1 , 2 , 3 , np .nan , 4 ], dtype = 'f8' )
44- self .assert_numpy_array_equal (result , expected )
44+ tm .assert_numpy_array_equal (result , expected )
4545
4646 def test_convert_sql_column_longs (self ):
4747 arr = np .array ([long (1 ), long (2 ), long (3 ), long (4 )], dtype = 'O' )
4848 result = lib .convert_sql_column (arr )
4949 expected = np .array ([1 , 2 , 3 , 4 ], dtype = 'i8' )
50- self .assert_numpy_array_equal (result , expected )
50+ tm .assert_numpy_array_equal (result , expected )
5151
5252 arr = np .array ([long (1 ), long (2 ), long (3 ), None , long (4 )], dtype = 'O' )
5353 result = lib .convert_sql_column (arr )
5454 expected = np .array ([1 , 2 , 3 , np .nan , 4 ], dtype = 'f8' )
55- self .assert_numpy_array_equal (result , expected )
55+ tm .assert_numpy_array_equal (result , expected )
5656
5757 def test_convert_sql_column_bools (self ):
5858 arr = np .array ([True , False , True , False ], dtype = 'O' )
5959 result = lib .convert_sql_column (arr )
6060 expected = np .array ([True , False , True , False ], dtype = bool )
61- self .assert_numpy_array_equal (result , expected )
61+ tm .assert_numpy_array_equal (result , expected )
6262
6363 arr = np .array ([True , False , None , False ], dtype = 'O' )
6464 result = lib .convert_sql_column (arr )
6565 expected = np .array ([True , False , np .nan , False ], dtype = object )
66- self .assert_numpy_array_equal (result , expected )
66+ tm .assert_numpy_array_equal (result , expected )
6767
6868 def test_convert_sql_column_decimals (self ):
6969 from decimal import Decimal
7070 arr = np .array ([Decimal ('1.5' ), None , Decimal ('3' ), Decimal ('4.2' )])
7171 result = lib .convert_sql_column (arr )
7272 expected = np .array ([1.5 , np .nan , 3 , 4.2 ], dtype = 'f8' )
73- self .assert_numpy_array_equal (result , expected )
73+ tm .assert_numpy_array_equal (result , expected )
7474
7575 def test_convert_downcast_int64 (self ):
7676 from pandas .io .libparsers import na_values
@@ -80,30 +80,30 @@ def test_convert_downcast_int64(self):
8080
8181 # default argument
8282 result = lib .downcast_int64 (arr , na_values )
83- self .assert_numpy_array_equal (result , expected )
83+ tm .assert_numpy_array_equal (result , expected )
8484
8585 result = lib .downcast_int64 (arr , na_values , use_unsigned = False )
86- self .assert_numpy_array_equal (result , expected )
86+ tm .assert_numpy_array_equal (result , expected )
8787
8888 expected = np .array ([1 , 2 , 7 , 8 , 10 ], dtype = np .uint8 )
8989 result = lib .downcast_int64 (arr , na_values , use_unsigned = True )
90- self .assert_numpy_array_equal (result , expected )
90+ tm .assert_numpy_array_equal (result , expected )
9191
9292 # still cast to int8 despite use_unsigned=True
9393 # because of the negative number as an element
9494 arr = np .array ([1 , 2 , - 7 , 8 , 10 ], dtype = np .int64 )
9595 expected = np .array ([1 , 2 , - 7 , 8 , 10 ], dtype = np .int8 )
9696 result = lib .downcast_int64 (arr , na_values , use_unsigned = True )
97- self .assert_numpy_array_equal (result , expected )
97+ tm .assert_numpy_array_equal (result , expected )
9898
9999 arr = np .array ([1 , 2 , 7 , 8 , 300 ], dtype = np .int64 )
100100 expected = np .array ([1 , 2 , 7 , 8 , 300 ], dtype = np .int16 )
101101 result = lib .downcast_int64 (arr , na_values )
102- self .assert_numpy_array_equal (result , expected )
102+ tm .assert_numpy_array_equal (result , expected )
103103
104104 int8_na = na_values [np .int8 ]
105105 int64_na = na_values [np .int64 ]
106106 arr = np .array ([int64_na , 2 , 3 , 10 , 15 ], dtype = np .int64 )
107107 expected = np .array ([int8_na , 2 , 3 , 10 , 15 ], dtype = np .int8 )
108108 result = lib .downcast_int64 (arr , na_values )
109- self .assert_numpy_array_equal (result , expected )
109+ tm .assert_numpy_array_equal (result , expected )
0 commit comments