def testArgsortManually(self):
    x = onp.array([16, 15, 23, 42, 8, 4])
    ans = jnp.argsort(x)
    expected = onp.argsort(x)
    self.assertAllClose(expected, ans, check_dtypes=False)
    x = onp.array([[16, 15, 23], [42, 8, 4]])
    ans = jnp.argsort(x, axis=0)
    expected = onp.argsort(x, axis=0)
    self.assertAllClose(expected, ans, check_dtypes=False)
    x = onp.array([[16, 15, 23], [42, 8, 4]])
    ans = jnp.argsort(x, axis=1)
    expected = onp.argsort(x, axis=1)
    self.assertAllClose(expected, ans, check_dtypes=False)
    x = onp.array([[16, 15, 23], [42, 8, 4]])
    ans = jnp.argsort(x, axis=None)
    expected = onp.argsort(x, axis=None)
    self.assertAllClose(expected, ans, check_dtypes=False)
    x = onp.array([[16, 15, 23], [42, 8, 4]])
    ans = jnp.argsort(x)
    expected = onp.argsort(x)
    self.assertAllClose(expected, ans, check_dtypes=False)
def testArgsortManually(self):
    x = onp.array([16, 15, 23, 42, 8, 4])
    ans = jnp.argsort(x)
    expected = onp.argsort(x)
    self.assertAllClose(expected, ans, check_dtypes=False)
    x = onp.array([[16, 15, 23], [42, 8, 4]])
    ans = jnp.argsort(x, axis=0)
    expected = onp.argsort(x, axis=0)
    self.assertAllClose(expected, ans, check_dtypes=False)
    x = onp.array([[16, 15, 23], [42, 8, 4]])
    ans = jnp.argsort(x, axis=1)
    expected = onp.argsort(x, axis=1)
    self.assertAllClose(expected, ans, check_dtypes=False)
    x = onp.array([[16, 15, 23], [42, 8, 4]])
    ans = jnp.argsort(x, axis=None)
    expected = onp.argsort(x, axis=None)
    self.assertAllClose(expected, ans, check_dtypes=False)
    x = onp.array([[16, 15, 23], [42, 8, 4]])
    ans = jnp.argsort(x)
    expected = onp.argsort(x)
    self.assertAllClose(expected, ans, check_dtypes=False)