We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi guys,
I got this error while trying to convert a dmatrix to a numpy array : error: unpack requires a buffer of 1 bytes
Here is my code:
`import os import xgboost as xgb from sklearn.model_selection import train_test_split from dmatrix2np import dmatrix_to_numpy
train, test = train_test_split(df, test_size=0.2)
dtrain = xgb.DMatrix(train.drop(columns={'default', 'types', 'iin', 'DATA_FLAG', 'type', 'requested_at', 'id'}), train['default']) dtest = xgb.DMatrix(test.drop(columns={'default', 'types', 'iin', 'DATA_FLAG', 'type', 'requested_at', 'id'}), test['default'])
converted_np_array = dmatrix_to_numpy(dtrain) ` Any idea on how to fix?
The text was updated successfully, but these errors were encountered:
Same issue. Did you find a solution?
Sorry, something went wrong.
No branches or pull requests
Hi guys,
I got this error while trying to convert a dmatrix to a numpy array : error: unpack requires a buffer of 1 bytes
Here is my code:
`import os
import xgboost as xgb
from sklearn.model_selection import train_test_split
from dmatrix2np import dmatrix_to_numpy
train, test = train_test_split(df, test_size=0.2)
dtrain = xgb.DMatrix(train.drop(columns={'default', 'types', 'iin', 'DATA_FLAG', 'type', 'requested_at', 'id'}), train['default'])
dtest = xgb.DMatrix(test.drop(columns={'default', 'types', 'iin', 'DATA_FLAG', 'type', 'requested_at', 'id'}), test['default'])
converted_np_array = dmatrix_to_numpy(dtrain)
`
Any idea on how to fix?
The text was updated successfully, but these errors were encountered: