`jnp.sinc` causes error with NaNs debugging enabled
The [current implementation of `sinc`](https://github.com/google/jax/blob/d39261497c12488632cf7c5d5f19d2c074a565dd/jax/_src/numpy/lax_numpy.py#L1061) function generates NaNs that are detected when `jax_debug_nans` is activated.

**To reproduce:**
```python
import jax
import jax.numpy as jnp
from jax.config import config 
config.update("jax_debug_nans", True)

x = jnp.array([0.])
x = jnp.sinc(x)
```

Output:
```python
---------------------------------------------------------------------------

FloatingPointError                        Traceback (most recent call last)

<ipython-input-5-ca7132c5c117> in <module>()
      6 x = jnp.array([0.])
      7 
----> 8 x = jnp.sinc(x)

[...]

/usr/local/lib/python3.7/dist-packages/jax/interpreters/xla.py in _check_special(name, xla_shape, buf)
    374   if dtypes.issubdtype(xla_shape.element_type(), np.inexact):
    375     if config.jax_debug_nans and np.any(np.isnan(buf.to_py())):
--> 376       raise FloatingPointError(f"invalid value (nan) encountered in {name}")
    377     if config.jax_debug_infs and np.any(np.isinf(buf.to_py())):
    378       raise FloatingPointError(f"invalid value (inf) encountered in {name}")

FloatingPointError: invalid value (nan) encountered in div
```


The error comes from the second branch of the `jnp.where` function [here](https://github.com/google/jax/blob/d39261497c12488632cf7c5d5f19d2c074a565dd/jax/_src/numpy/lax_numpy.py#L1068), which has NaNs where `safe_pi_x` is `0`. Those NaNs are filtered out by the `where` function but are nevertheless produced and detected by the NaNs debugger.

diff --git a/jax/_src/numpy/lax_numpy.py b/jax/_src/numpy/lax_numpy.py
index 2042408ac..a7622261e 100644
--- a/jax/_src/numpy/lax_numpy.py
+++ b/jax/_src/numpy/lax_numpy.py
@@ -1064,7 +1064,7 @@ def sinc(x):
   x, = _promote_dtypes_inexact(x)
   eq_zero = lax.eq(x, lax._const(x, 0))
   pi_x = lax.mul(lax._const(x, pi), x)
-  safe_pi_x = where(eq_zero, lax._const(x, 0), pi_x)
+  safe_pi_x = where(eq_zero, lax._const(x, 1), pi_x)
   return where(eq_zero, _sinc_maclaurin(0, pi_x),
                lax.div(lax.sin(safe_pi_x), safe_pi_x))
 
diff --git a/tests/debug_nans_test.py b/tests/debug_nans_test.py
index 005de7d59..4aef41cf6 100644
--- a/tests/debug_nans_test.py
+++ b/tests/debug_nans_test.py
@@ -37,6 +37,10 @@ class DebugNaNsTest(jtu.JaxTestCase):
   def tearDown(self):
     config.update("jax_debug_nans", self.cfg)
 
+  def testSinc(self):
+    # Regression test for #6936
+    self.assertEqual(jnp.sinc(0.0), 1.0)
+
   def testSingleResultPrimitiveNoNaN(self):
     A = jnp.array([[1., 2.], [2., 3.]])
     ans = jnp.tanh(A)
['jax/_src/numpy/lax_numpy.py', 'tests/debug_nans_test.py']