BUG: numpy and jax differ on modulus by zero
### Description

Jax and numpy differ in their behavior with regards to computing a modulus by zero. Jax treats it as a no-op, and numpy treats it as the zero function.

## Numpy

```python
Python 3.10.5 (main, Jul 15 2022, 03:56:49) [GCC 11.3.0] on linux
>>> import numpy as np
>>> a = np.array([1,2,3], dtype=np.uint32)
>>> np.mod(a, 0)
<stdin>:1: RuntimeWarning: divide by zero encountered in remainder
array([0, 0, 0], dtype=uint32)
```

## JAX

```python
>>> import jax.numpy as jnp
>>> a = jnp.array([1,2,3], dtype=jnp.uint32)
>>> jnp.mod(a, 0)
DeviceArray([1, 2, 3], dtype=uint32)
```

### What jax/jaxlib version are you using?

HEAD

### Which accelerator(s) are you using?

CPU

### Additional System Info

Python 3.9, 3.10.5
diff --git a/jax/_src/numpy/ufuncs.py b/jax/_src/numpy/ufuncs.py
index 1062650e3..5795a0fda 100644
--- a/jax/_src/numpy/ufuncs.py
+++ b/jax/_src/numpy/ufuncs.py
@@ -529,6 +529,8 @@ def frexp(x):
 def remainder(x1, x2):
   x1, x2 = _promote_args_numeric("remainder", x1, x2)
   zero = _constant_like(x1, 0)
+  if dtypes.issubdtype(x2.dtype, np.integer):
+    x2 = _where(x2 == 0, lax_internal._ones(x2), x2)
   trunc_mod = lax.rem(x1, x2)
   trunc_mod_not_zero = lax.ne(trunc_mod, zero)
   do_plus = lax.bitwise_and(
diff --git a/tests/lax_numpy_test.py b/tests/lax_numpy_test.py
index d371eedec..b6362783c 100644
--- a/tests/lax_numpy_test.py
+++ b/tests/lax_numpy_test.py
@@ -286,9 +286,9 @@ JAX_COMPOUND_OP_RECORDS = [
     op_record("rad2deg", 1, float_dtypes, all_shapes, jtu.rand_default, []),
     op_record("ravel", 1, all_dtypes, all_shapes, jtu.rand_default, ["rev"]),
     op_record("real", 1, number_dtypes, all_shapes, jtu.rand_some_inf, []),
-    op_record("remainder", 2, default_dtypes, all_shapes, jtu.rand_nonzero, [],
+    op_record("remainder", 2, default_dtypes, all_shapes, jtu.rand_some_zero, [],
               tolerance={np.float16: 1e-2}),
-    op_record("mod", 2, default_dtypes, all_shapes, jtu.rand_nonzero, []),
+    op_record("mod", 2, default_dtypes, all_shapes, jtu.rand_some_zero, []),
     op_record("modf", 1, float_dtypes, all_shapes, jtu.rand_default, []),
     op_record("modf", 1, int_dtypes + unsigned_dtypes, all_shapes,
               jtu.rand_default, [], check_dtypes=False),
['jax/_src/numpy/ufuncs.py', 'tests/lax_numpy_test.py']