File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -762,7 +762,7 @@ class StataMissingValue:
762
762
"float64" : struct .unpack ("<d" , float64_base )[0 ],
763
763
}
764
764
765
- def __init__ (self , value : float ):
765
+ def __init__ (self , value : Union [ int , float ] ):
766
766
self ._value = value
767
767
# Conversion to int to avoid hash issues on 32 bit platforms #8968
768
768
value = int (value ) if value < 2147483648 else float (value )
@@ -781,7 +781,7 @@ def string(self) -> str:
781
781
return self ._str
782
782
783
783
@property
784
- def value (self ) -> float :
784
+ def value (self ) -> Union [ int , float ] :
785
785
"""
786
786
The binary representation of the missing value.
787
787
@@ -806,7 +806,7 @@ def __eq__(self, other: Any) -> bool:
806
806
)
807
807
808
808
@classmethod
809
- def get_base_missing_value (cls , dtype : np .dtype ) -> float :
809
+ def get_base_missing_value (cls , dtype : np .dtype ) -> Union [ int , float ] :
810
810
if dtype == np .int8 :
811
811
value = cls .BASE_MISSING_VALUES ["int8" ]
812
812
elif dtype == np .int16 :
You can’t perform that action at this time.
0 commit comments