src/sagemaker_xgboost_container/encoder.py
def decode(obj, content_type):
    # type: (np.array or Iterable or int or float, str) -> xgb.DMatrix
    """Decode an object ton a one of the default content types to a DMatrix object.
    Args:
        obj (object): to be decoded.
        content_type (str): content type to be used.
    Returns:
        np.array: decoded object.
    """
    try:
        decoder = _dmatrix_decoders_map[content_type]
        return decoder(obj)
    except KeyError:
        raise _errors.UnsupportedFormatError(content_type)
Decode an object ton a one of the default content types to a DMatrix object.
    Args:
        obj (object): to be decoded.
        content_type (str): content type to be used.
    Returns:
        np.array: decoded object.
    
Decode an object ton a one of the default content types to a DMatrix object.
Decode an object ton a one of the default content types to a DMatrix object .
def decode(obj, content_type):
    try:
        decoder = _dmatrix_decoders_map[content_type]
        return decoder(obj)
    except KeyError:
        raise _errors.UnsupportedFormatError(content_type)
def decode ( obj , content_type ) : try : decoder = _dmatrix_decoders_map [ content_type ] return decoder ( obj ) except KeyError : raise _errors . UnsupportedFormatError ( content_type )
Decode an object ton a one of the default content types to a DMatrix object.
Decode an object ton a one of the default content types to a DMatrix object .
# type: (np.array or Iterable or int or float, str) -> xgb.DMatrix """Decode an object ton a one of the default content types to a DMatrix object.
    Args:
        obj (object): to be decoded.
        content_type (str): content type to be used.
    Returns:
        np.array: decoded object.
    """
None
np.array
obj
to be decoded.
to be decoded .
content_type
content type to be used.
content type to be used .