-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
QDA may meet broken 2d array #4006
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
Comments
Closed
close if it was fixed by #3755 I just merged. |
This could be caused by dtype='object'. |
@MidoriYakumo can you give us |
I did not store that data but it is true that bad shape caused this error, a normal 2d "array in array" can be automatically and safely converted by numpy, I think. |
Python 2.7.9 (default, Dec 13 2014, 18:02:08) [GCC] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy as np
np>>a=np.array([1,2,3])
>>> b=np.array([1,2])
>>> c=np.array([a,a,b])
>>> c
array([array([1, 2, 3]), array([1, 2, 3]), array([1, 2])], dtype=object)
>>> np.log(c)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'numpy.ndarray' object has no attribute 'log'
>>> d=np.array([a,a,a])
>>> np.log(d)
array([[ 0. , 0.69314718,
8000
1.09861229],
[ 0. , 0.69314718, 1.09861229],
[ 0. , 0.69314718, 1.09861229]]) |
Ok, I'm working on it in #4057. |
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For my dataset it gives:
When
It shows that scalings is a 2d array in shape of (0..23, 0..23, 0..23, 0..6)
The text was updated successfully, but these errors were encountered: