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
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