Question # 35
areeb-h-qureshi opened this issue · 1 comments
areeb-h-qureshi commented
With new casting rules, input arrays must be specified as a float inorder for np.divide to work. Otherwise casting of np.divide must be set to 'unsafe'
A = np.ones(3)*1
A.astype('float') # Possible fix
B = np.ones(3)*2
B.astype('float') # Possible fix
np.divide(A,2,out=A, casting='unsafe') # Alternative Fix
rougier commented
Even with strict casting rules, all arrays are float arrays so I don't understand why np.divide
would complain