Skip to content
New issue

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

I feel confused about data_utils.read_sparse_file function #24

Closed
xuehuachunsheng opened this issue Sep 19, 2022 · 3 comments
Closed

I feel confused about data_utils.read_sparse_file function #24

xuehuachunsheng opened this issue Sep 19, 2022 · 3 comments

Comments

@xuehuachunsheng
Copy link

When I run
true_labels = data_utils.read_sparse_file('Sandbox/Data/EUR-Lex/tst_X_Y.txt')
It raise an exception that ValueError: buffer size must be a multiple of element size from sparse.py line 257,
i.e., indices = np.frombuffer(ind, np.int64)
I see that ind is an array that with typecode = 'l', it seems that the each element in ind takes 4 bytes, according to https://docs.python.org/3/library/array.html.

So I am confused that why loading frombuffer with dtype np.int64?

My machine is 64bit OS.
Python is the version 3.8.8.

@kunaldahiya
Copy link
Owner

Hi

Are you running it on Windows?

@xuehuachunsheng
Copy link
Author

Yes. So where is the problem?

@kunaldahiya
Copy link
Owner

The issue is Windows specific. Please refer to the solution mentioned here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants