def _check_shuffle(self, func, ptr):
        """
        Check a shuffle()-like function for 1D arrays.
        """
        # Our implementation follows Python 3's.
        a = np.arange(20)
        if (3,) >= sys.version_info:
            r = self._follow_cpython(ptr)
            for i in range(3):
                got = a.copy()
                expected = a.copy()
                func(got)
                r.shuffle(expected)
                self.assertTrue(np.all(got == expected), (got, expected))
        else:
            # Sanity check
            for i in range(3):
                b = a.copy()
                func(b)
                self.assertFalse(np.all(a == b))
                self.assertEqual(sorted(a), sorted(b))
                a = b
        # Test with an arbitrary buffer-providing object
        b = a.copy()
        func(memoryview(b))
        self.assertFalse(np.all(a == b))
        self.assertEqual(sorted(a), sorted(b))
        # Read-only object
        with self.assertTypingError():
            func(memoryview(b"xyz"))
dataset/ETHPy150Open numba/numba/numba/tests/test_random.py/TestRandom._check_shuffle/swapped operands of `>=`