Updated numpy bitwise operations to Python bit wise operations