TypeError: array cannot be safely cast to required type
I followed the "simple example" and setup training and testing data,
then ran Knn.compute. Next, the algorithm chokes on
Knn.predict(test_data). Any help would be very much appreciated.
thanks,
-Jesse
In [11]: test_data.dtype
Out[11]: dtype('int32')
In [12]: test_data = asarray(tm, dtype=float)
In [13]: test_data.dtype
Out[13]: dtype('float64')
The last instance of test_data is what I have been working with. I
have tried to downcast to float32 in case nncore can't handle float64
on my 32-bit laptop. Same error. (In fact, same error on 32 and 64 bit
machines, actually.)
thanks for your help,
-Jesse
> --
> You received this message because you are subscribed to the Google Groups "mlpy-general" group.
> To post to this group, send email to mlpy-g...@googlegroups.com.
> To unsubscribe from this group, send email to mlpy-general...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/mlpy-general?hl=en.
>
>
--
PhD Candidate
Department of Mathematics
Montana State University
Bozeman, MT