-
Notifications
You must be signed in to change notification settings - Fork 85
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
what about the ValueError: bad alignment #12
Comments
I have the same problem. This may be related to the shape of input matrix: the number of samples should be larger than the dimension of features to some extent. |
I need more details. A well-aligned piece of data should start with an address divisible by 4 or 8, and the size of each row should be divisible by 4 or 8 (4 for float and 8 for double). |
Hi, I'm running into a similar "valueError: bad alignment". |
I found a 'hacky' way of solving this. just repopulating the random.rand matrix with the values from the dataframe matrix... i suppose the data is now at the correct memory address.... |
The easiest way is to np.copy the matrix before feeding it in. Sometimes the matrix is a view of a bigger matrix. In such case, both the view and the original matrix share the underlying data and therefore the same row stride. |
My input dataset has converted as numpy matrices by np.asmatrix() and it's dim is 1024;
I use the python API
The text was updated successfully, but these errors were encountered: