FIX for numpy compatibility, code clarity