Skip to content

Commit 6933240

Browse files
authored
[python-package] remove unused functions in xgboost.data (#8695)
1 parent 4416452 commit 6933240

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

python-package/xgboost/data.py

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,6 @@ def _warn_unused_missing(data: DataType, missing: Optional[FloatCompatible]) ->
5252
)
5353

5454

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-
6355
def _check_data_shape(data: DataType) -> None:
6456
if hasattr(data, "shape") and len(data.shape) != 2:
6557
raise ValueError("Please reshape the input data into 2-dimensional matrix.")
@@ -1023,15 +1015,6 @@ def dispatch_data_backend(
10231015
raise TypeError('Not supported type for data.' + str(type(data)))
10241016

10251017

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-
10351018
def _validate_meta_shape(data: DataType, name: str) -> None:
10361019
if hasattr(data, "shape"):
10371020
msg = f"Invalid shape: {data.shape} for {name}"

0 commit comments

Comments
 (0)