Why does this array has no attribute 'log10'?
https://www.py4u.net/discuss/238480The data type of hx is object.You can see that in the output, and you can check hx.dtype.The objects stored in the array are apparently Python floats. Numpy doesn't know what you might have stored in a object array, so it attempts to dispatch its functions (such as log10) to the objects in the array.This fails because Python floats don't have a log10 method.