# dirac

### deepinv.utils.dirac(shape, device='cpu')

Returns a [`torch.Tensor`](https://docs.pytorch.org/docs/stable/tensors.html#torch.Tensor) with a Dirac delta in 2D at the center.

* **Parameters:**
  * **shape** ([*tuple*](https://docs.python.org/3.12/library/stdtypes.html#tuple)) – shape of the output tensor.
  * **device** ([*str*](https://docs.python.org/3.12/library/stdtypes.html#str)) – device of the output tensor.
