@@ -52,14 +52,6 @@ def _warn_unused_missing(data: DataType, missing: Optional[FloatCompatible]) ->
52
52
)
53
53
54
54
55
- def _check_complex (data : DataType ) -> None :
56
- '''Test whether data is complex using `dtype` attribute.'''
57
- complex_dtypes = (np .complex128 , np .complex64 ,
58
- np .cfloat , np .cdouble , np .clongdouble )
59
- if hasattr (data , 'dtype' ) and data .dtype in complex_dtypes :
60
- raise ValueError ('Complex data not supported' )
61
-
62
-
63
55
def _check_data_shape (data : DataType ) -> None :
64
56
if hasattr (data , "shape" ) and len (data .shape ) != 2 :
65
57
raise ValueError ("Please reshape the input data into 2-dimensional matrix." )
@@ -1023,15 +1015,6 @@ def dispatch_data_backend(
1023
1015
raise TypeError ('Not supported type for data.' + str (type (data )))
1024
1016
1025
1017
1026
- def _to_data_type (dtype : str , name : str ) -> int :
1027
- dtype_map = {'float32' : 1 , 'float64' : 2 , 'uint32' : 3 , 'uint64' : 4 }
1028
- if dtype not in dtype_map :
1029
- raise TypeError (
1030
- f'Expecting float32, float64, uint32, uint64, got { dtype } ' +
1031
- f'for { name } .' )
1032
- return dtype_map [dtype ]
1033
-
1034
-
1035
1018
def _validate_meta_shape (data : DataType , name : str ) -> None :
1036
1019
if hasattr (data , "shape" ):
1037
1020
msg = f"Invalid shape: { data .shape } for { name } "
0 commit comments