I'm trying to understand what is the difference (if there's any) between those two outputs.
array([array([203., 164., 87., ..., 1., 1., 0.]),
array([39., 44., 40., ..., 40., 30., 21.]),
array([152., 144., 133., ..., 36., 36., 36.])], dtype=object)
And
array([[ 0., 0., 5., ..., 0., 0., 0.],
[ 0., 0., 0., ..., 10., 0., 0.],
[ 0., 0., 0., ..., 16., 9., 0.],
...,
[ 0., 0., 1., ..., 6., 0., 0.],
[ 0., 0., 2., ..., 12., 0., 0.],
[ 0., 0., 10., ..., 12., 1., 0.]])
To me, both these structures are 2D arrays. But for some reason, one of them is printed differently.
I'm trying to feed the first structure to a complex function (svm.SVC.fit). The second one works, but the first one doesn't:
setting an array element with a sequence
although they seem to be the exact same to me ..
type(firstArray[0])ortype(secondArray[0])they both yieldnumpy.ndarraytype(firstArray[0][0])andtype(secondArray[0][0])are bothnumpy.float64setting an array element with a sequence.. But before trying to understand this message, I'd like to understand if both these outputs are different at all. If they are, I'll be able to fix the second one to correspond to the first, and the error should go awayarray([...])as opposed to[...].