(inst, feat_num, missing_bin_idx)
return inst
This for use_missing + zero_as_missing case
This for use_missing + zero_as_missing case
This for use_missing + zero_as_missing case
def _handle_zero_as_missing(inst, feat_num, missing_bin_idx):

        """
        This for use_missing + zero_as_missing case
        """

        sparse_vec = inst.features.sparse_vec
        arr = np.zeros(feat_num, dtype=np.uint8) + missing_bin_idx
        for k, v in sparse_vec.items():
            if v != NoneType():
                arr[k] = v
        inst.features = arr
        return inst
def _handle_zero_as_missing ( inst , feat_num , missing_bin_idx ) : sparse_vec = inst . features . sparse_vec arr = np . zeros ( feat_num , dtype = np . uint8 ) + missing_bin_idx for k , v in sparse_vec . items ( ) : if v != NoneType ( ) : arr [ k ] = v inst . features = arr return inst