Switching from np to math for scalar float ops