I do:
print "e: ", scaled_target, type(scaled_target)
print "f: ", numpy.isnan(scaled_target)
which returns
e: [0.0 0.0 0.0 0.0] <type 'numpy.ndarray'>
f:
Traceback (most recent call last):
File "./a.py", line 106, in <module>
print "f: ", numpy.isnan(scaled_target)
TypeError: function not supported for these types, and can't coerce safely to supported types
The manual says that numpy.isnan
accepts ndarray
. I'm not sure what's going wrong.