File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -762,7 +762,7 @@ class StataMissingValue:
762762 "float64" : struct .unpack ("<d" , float64_base )[0 ],
763763 }
764764
765- def __init__ (self , value : float ):
765+ def __init__ (self , value : Union [ int , float ] ):
766766 self ._value = value
767767 # Conversion to int to avoid hash issues on 32 bit platforms #8968
768768 value = int (value ) if value < 2147483648 else float (value )
@@ -781,7 +781,7 @@ def string(self) -> str:
781781 return self ._str
782782
783783 @property
784- def value (self ) -> float :
784+ def value (self ) -> Union [ int , float ] :
785785 """
786786 The binary representation of the missing value.
787787
@@ -806,7 +806,7 @@ def __eq__(self, other: Any) -> bool:
806806 )
807807
808808 @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 ] :
810810 if dtype == np .int8 :
811811 value = cls .BASE_MISSING_VALUES ["int8" ]
812812 elif dtype == np .int16 :
You can’t perform that action at this time.
0 commit comments