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.
python - Numpy AttributeError: 'float' object has no ...
https://stackoverflow.com/questions/18557337Probably there's something wrong with the input values for X and/or T. The function from the question works ok: import numpy as np from math import e def sigmoid (X, T): return 1.0 / (1.0 + np.exp (-1.0 * np.dot (X, T))) X = np.array ( [ [1, 2, 3], [5, 0, 0]]) T = np.array ( [ [1, 2], [1, 1], [4, 4]]) print (X.dot (T)) # Just to see if values ...