@@ -502,12 +502,14 @@ def test_obj_none_preservation(self):
502
502
tm .assert_numpy_array_equal (result , expected , strict_nan = True )
503
503
504
504
def test_signed_zero (self ):
505
+ # GH 21866
505
506
a = np .array ([- 0.0 , 0.0 ])
506
507
result = pd .unique (a )
507
508
expected = np .array ([- 0.0 ]) # 0.0 and -0.0 are equivalent
508
509
tm .assert_numpy_array_equal (result , expected )
509
510
510
511
def test_different_nans (self ):
512
+ # GH 21866
511
513
# create different nans from bit-patterns:
512
514
NAN1 = struct .unpack ("d" , struct .pack ("=Q" , 0x7ff8000000000000 ))[0 ]
513
515
NAN2 = struct .unpack ("d" , struct .pack ("=Q" , 0x7ff8000000000001 ))[0 ]
@@ -1106,6 +1108,7 @@ def test_lookup_nan(self, writable):
1106
1108
dtype = np .int64 ))
1107
1109
1108
1110
def test_add_signed_zeros (self ):
1111
+ # GH 21866 inconsistent hash-function for float64
1109
1112
# default hash-function would lead to different hash-buckets
1110
1113
# for 0.0 and -0.0 if there are more than 2^30 hash-buckets
1111
1114
# but this would mean 16GB
@@ -1116,6 +1119,7 @@ def test_add_signed_zeros(self):
1116
1119
assert len (m ) == 1 # 0.0 and -0.0 are equivalent
1117
1120
1118
1121
def test_add_different_nans (self ):
1122
+ # GH 21866 inconsistent hash-function for float64
1119
1123
# create different nans from bit-patterns:
1120
1124
NAN1 = struct .unpack ("d" , struct .pack ("=Q" , 0x7ff8000000000000 ))[0 ]
1121
1125
NAN2 = struct .unpack ("d" , struct .pack ("=Q" , 0x7ff8000000000001 ))[0 ]
0 commit comments