I have two numpy arrays, X_train and Y_train, where the first of dimensions (700,1000) is populated by the values 0, 1, 2, 3, 4, and 10. The second of dimensions (700,) is p
The problems seems to be the dtype of y. looks like numpy didnt manage to figure out it was a string. so it was set to a generic object. If you change:
Y = np.asarray(critics['fresh'])
to Y = np.asarray(critics['fresh'], dtype="|S6")
i think it should work.
I also faced the same problem. Numpy sometimes fails t detect datatype of array. So, we give it explicitly. here is the documentation of all the types by numpy. Select datatype according to your requirement and provide it as "dtype=" attribute.