# tree_d_3d.kernels.soften_pairs.soften_pairs_numpy

*module*

The NumPy version of the ``soften_pairs`` kernel, for machines without Pyccel.

Vectorized over the listed pairs; the same arguments and results as ``soften_pairs_pyccel.py``.

[View source](https://github.com/max-models/tree-d-3d/blob/devel/src/tree_d_3d/kernels/soften_pairs/soften_pairs_numpy.py#L1-L1)

## tree_d_3d.kernels.soften_pairs.soften_pairs_numpy.CHUNK

*attribute* · *module attribute*

```python
CHUNK = 256
```

[View source](https://github.com/max-models/tree-d-3d/blob/devel/src/tree_d_3d/kernels/soften_pairs/soften_pairs_numpy.py#L11-L11)

## tree_d_3d.kernels.soften_pairs.soften_pairs_numpy.soften_pairs

*function*

```python
def soften_pairs(pos: np.ndarray, charge: np.ndarray, pairs: np.ndarray, eps2: float, with_potential: int, phi: np.ndarray, field: np.ndarray, status: np.ndarray) -> None
```

Replace the bare line-charge kernel by the softened one for listed pairs.

Adds, for each pair, the difference between the softened
(-q ln(r**2 + eps**2), 2 q d / (r**2 + eps**2)) and the bare kernel, to
both partners. ``status[0]`` becomes 1 + a pair index at zero separation.

[View source](https://github.com/max-models/tree-d-3d/blob/devel/src/tree_d_3d/kernels/soften_pairs/soften_pairs_numpy.py#L14-L45)
