---
title: "ClikaRT::ops::exponential_"
sidebar_label: "exponential_"
description: "In-place exponential fill with rate lambd: overwrites self with draws from p(x) = lambd * exp(-lambd * x) (x >= 0) and returns it under the value surface, Result<void> under the Result surface; CLIKAR…"
---

<!-- Generated by tools/doxygen2mdx from Doxygen XML. Do not edit. -->

<span class="api-kind api-kind--function">function</span>

## exponential\_() {#exponential_}

<div class="api-signature">

[`Tensor`](../Tensor.md)`&` **`exponential_`**(<br />
&nbsp;&nbsp;&nbsp;&nbsp;[`Tensor`](../Tensor.md)`&` `self`,<br />
&nbsp;&nbsp;&nbsp;&nbsp;`double` `lambd` `=` `1.0`,<br />
&nbsp;&nbsp;&nbsp;&nbsp;[`StreamOrDevice`](../StreamOrDevice.md) `device` `=` `{}`<br />
)

</div>

In-place exponential fill with rate `lambd`: overwrites `self` with draws from `p(x) = lambd * `[`exp`](./exp.md#exp)`(-lambd * x)` (x \>= 0) and returns it under the value surface, [`Result`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling.

**Parameters**

- `self`: the tensor to fill; float dtype.
- `lambd`: the rate parameter; must be positive; default 1.0.
- `device`: stream or device; default = `self`'s.

**Throws**

- `ClikaRT::Error`: (`INVALID_ARGUMENT`) on a non-positive `lambd`.

<div class="api-declared">

Declared in `ClikaRT/compute/ops.h`, line 4123

</div>
