Hi guys im just a rookie in python (even in programming) so my question might sound very basic but i have a hard time to understand this.
Why is the selective behavior on arithmetics on 'float object'?
import numpy as np
a = np.random.normal(size=10)
a = np.abs(a)
b = np.array(a, dtype=object)
np.square(a) # this works
np.square(b) # this works
np.sqrt(a) # this works
np.sqrt(b) # AttributeError: 'float' object has no attribute 'sqrt'
The image link is my run result in local jupyter notebook:
Appreciate useful insights! thanks
edit 050418 09:53 --add a link that i think is similar issue Numpy AttributeError: 'float' object has no attribute 'exp'