Fixed numpy warnings and int/float division bug