@@ -628,15 +628,15 @@ def test_process_continuous_obj_hard_bad():
628628
629629
630630def test_process_continuous_str_simple ():
631- vals , bad = _process_continuous (np .array (["1" , "2.5" ], dtype = np .unicode_ ), None )
631+ vals , bad = _process_continuous (np .array (["1" , "2.5" ], dtype = np .str_ ), None )
632632 assert bad is None
633633 assert vals .dtype == np .float64
634634 assert np .array_equal (vals , np .array ([1 , 2.5 ], dtype = np .float64 ))
635635
636636
637637def test_process_continuous_str_simple_missing ():
638638 vals , bad = _process_continuous (
639- np .array (["1" , "2.5" ], dtype = np .unicode_ ),
639+ np .array (["1" , "2.5" ], dtype = np .str_ ),
640640 np .array ([True , True , False ], dtype = np .bool_ ),
641641 )
642642 assert bad is None
@@ -649,7 +649,7 @@ def test_process_continuous_str_simple_missing():
649649
650650def test_process_continuous_str_hard_bad ():
651651 vals , bad = _process_continuous (
652- np .array (["1" , "2.5" , "bad" ], dtype = np .unicode_ ),
652+ np .array (["1" , "2.5" , "bad" ], dtype = np .str_ ),
653653 np .array ([True , True , True , False ], dtype = np .bool_ ),
654654 )
655655 assert len (bad ) == 4
@@ -708,7 +708,7 @@ def test_process_column_initial_obj_obj():
708708
709709def test_process_column_initial_alphabetical_nomissing ():
710710 encoded , c = _process_column_initial (
711- np .array (["xyz" , "abc" , "xyz" ], dtype = np .unicode_ ),
711+ np .array (["xyz" , "abc" , "xyz" ], dtype = np .str_ ),
712712 None ,
713713 "nominal_alphabetical" ,
714714 None ,
@@ -723,7 +723,7 @@ def test_process_column_initial_alphabetical_nomissing():
723723
724724def test_process_column_initial_alphabetical_missing ():
725725 encoded , c = _process_column_initial (
726- np .array (["xyz" , "abc" , "xyz" ], dtype = np .unicode_ ),
726+ np .array (["xyz" , "abc" , "xyz" ], dtype = np .str_ ),
727727 np .array ([True , True , False , True ], dtype = np .bool_ ),
728728 "nominal_alphabetical" ,
729729 None ,
@@ -738,7 +738,7 @@ def test_process_column_initial_alphabetical_missing():
738738
739739def test_process_column_initial_prevalence_nomissing ():
740740 encoded , c = _process_column_initial (
741- np .array (["xyz" , "abc" , "xyz" ], dtype = np .unicode_ ),
741+ np .array (["xyz" , "abc" , "xyz" ], dtype = np .str_ ),
742742 None ,
743743 "nominal_prevalence" ,
744744 None ,
@@ -753,7 +753,7 @@ def test_process_column_initial_prevalence_nomissing():
753753
754754def test_process_column_initial_prevalence_missing ():
755755 encoded , c = _process_column_initial (
756- np .array (["xyz" , "abc" , "xyz" ], dtype = np .unicode_ ),
756+ np .array (["xyz" , "abc" , "xyz" ], dtype = np .str_ ),
757757 np .array ([True , True , False , True ], dtype = np .bool_ ),
758758 "nominal_prevalence" ,
759759 None ,
@@ -768,7 +768,7 @@ def test_process_column_initial_prevalence_missing():
768768
769769def test_process_column_initial_float64_nomissing ():
770770 encoded , c = _process_column_initial (
771- np .array (["11.1" , "2.2" , "11.1" ], dtype = np .unicode_ ),
771+ np .array (["11.1" , "2.2" , "11.1" ], dtype = np .str_ ),
772772 None ,
773773 "ANYTHING_ELSE" ,
774774 None ,
@@ -783,7 +783,7 @@ def test_process_column_initial_float64_nomissing():
783783
784784def test_process_column_initial_float64_missing ():
785785 encoded , c = _process_column_initial (
786- np .array (["11.1" , "2.2" , "11.1" ], dtype = np .unicode_ ),
786+ np .array (["11.1" , "2.2" , "11.1" ], dtype = np .str_ ),
787787 np .array ([True , True , False , True ], dtype = np .bool_ ),
788788 "ANYTHING_ELSE" ,
789789 None ,
@@ -1016,7 +1016,7 @@ def test_encode_categorical_existing_obj_floats():
10161016 np .float16 (2.2 ),
10171017 np .float32 (3.3 ),
10181018 np .float64 (4.4 ),
1019- np .longfloat (5.5 ),
1019+ np .longdouble (5.5 ),
10201020 ],
10211021 dtype = np .object_ ,
10221022 ),
@@ -1110,7 +1110,7 @@ def test_encode_categorical_existing_obj_obj():
11101110def test_encode_categorical_existing_str ():
11111111 c = {"abc" : 1 , "def" : 2 , "ghi" : 3 }
11121112 encoded , bad = _encode_categorical_existing (
1113- np .array (["abc" , "ghi" , "def" , "something" ], dtype = np .unicode_ ),
1113+ np .array (["abc" , "ghi" , "def" , "something" ], dtype = np .str_ ),
11141114 np .array ([True , True , False , True , True ], dtype = np .bool_ ),
11151115 c ,
11161116 )
@@ -1144,7 +1144,7 @@ def test_encode_categorical_existing_int8():
11441144def test_encode_categorical_existing_bool ():
11451145 c = {"False" : 1 , "True" : 2 }
11461146 encoded , bad = _encode_categorical_existing (
1147- np .array ([False , True , False ], dtype = np .unicode_ ),
1147+ np .array ([False , True , False ], dtype = np .str_ ),
11481148 np .array ([True , True , False , True ], dtype = np .bool_ ),
11491149 c ,
11501150 )
@@ -1157,7 +1157,7 @@ def test_encode_categorical_existing_bool():
11571157def test_encode_categorical_existing_bool_true ():
11581158 c = {"True" : 1 }
11591159 encoded , bad = _encode_categorical_existing (
1160- np .array ([False , True , False ], dtype = np .unicode_ ),
1160+ np .array ([False , True , False ], dtype = np .str_ ),
11611161 np .array ([True , True , False , True ], dtype = np .bool_ ),
11621162 c ,
11631163 )
@@ -1170,7 +1170,7 @@ def test_encode_categorical_existing_bool_true():
11701170def test_encode_categorical_existing_bool_false ():
11711171 c = {"False" : 1 }
11721172 encoded , bad = _encode_categorical_existing (
1173- np .array ([False , True , False ], dtype = np .unicode_ ),
1173+ np .array ([False , True , False ], dtype = np .str_ ),
11741174 np .array ([True , True , False , True ], dtype = np .bool_ ),
11751175 c ,
11761176 )
@@ -1794,7 +1794,7 @@ def test_unify_columns_pandas_missings_float64():
17941794
17951795
17961796def test_unify_columns_pandas_missings_longfloat ():
1797- check_pandas_float (np .longfloat , - 1.1 , 2.2 )
1797+ check_pandas_float (np .longdouble , - 1.1 , 2.2 )
17981798
17991799
18001800def test_unify_columns_pandas_missings_float32 ():
0 commit comments