@@ -433,9 +433,6 @@ def test_where_object(self, index_or_series, fill_val, exp_dtype):
433
433
)
434
434
def test_where_int64 (self , index_or_series , fill_val , exp_dtype , request ):
435
435
klass = index_or_series
436
- if klass is pd .Index and exp_dtype is np .complex128 :
437
- mark = pytest .mark .xfail (reason = "Complex Index not supported" )
438
- request .node .add_marker (mark )
439
436
440
437
obj = klass ([1 , 2 , 3 , 4 ])
441
438
assert obj .dtype == np .int64
@@ -447,9 +444,6 @@ def test_where_int64(self, index_or_series, fill_val, exp_dtype, request):
447
444
)
448
445
def test_where_float64 (self , index_or_series , fill_val , exp_dtype , request ):
449
446
klass = index_or_series
450
- if klass is pd .Index and exp_dtype is np .complex128 :
451
- mark = pytest .mark .xfail (reason = "Complex Index not supported" )
452
- request .node .add_marker (mark )
453
447
454
448
obj = klass ([1.1 , 2.2 , 3.3 , 4.4 ])
455
449
assert obj .dtype == np .float64
@@ -464,8 +458,8 @@ def test_where_float64(self, index_or_series, fill_val, exp_dtype, request):
464
458
(True , object ),
465
459
],
466
460
)
467
- def test_where_series_complex128 (self , fill_val , exp_dtype ):
468
- klass = pd . Series # TODO: use index_or_series once we have Index[complex]
461
+ def test_where_series_complex128 (self , index_or_series , fill_val , exp_dtype ):
462
+ klass = index_or_series
469
463
obj = klass ([1 + 1j , 2 + 2j , 3 + 3j , 4 + 4j ])
470
464
assert obj .dtype == np .complex128
471
465
self ._run_test (obj , fill_val , klass , exp_dtype )
@@ -624,11 +618,6 @@ def test_fillna_float64(self, index_or_series, fill_val, fill_dtype):
624
618
assert obj .dtype == np .float64
625
619
626
620
exp = klass ([1.1 , fill_val , 3.3 , 4.4 ])
627
- # float + complex -> we don't support a complex Index
628
- # complex for Series,
629
- # object for Index
630
- if fill_dtype == np .complex128 and klass == pd .Index :
631
- fill_dtype = object
632
621
self ._assert_fillna_conversion (obj , fill_val , exp , fill_dtype )
633
622
634
623
@pytest .mark .parametrize (
0 commit comments