---
title: "ClikaRT::ops::uniform_"
sidebar_label: "uniform_"
description: "In-place uniform fill on [low, high): overwrites self at its own shape/dtype and returns it under the value surface, Result<void> under the Result surface; CLIKART_CHECK is the mode-stable spelling."
---

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

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

## uniform\_() {#uniform_}

<div class="api-signature">

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

</div>

In-place uniform fill on `[low, high)`: overwrites `self` at its own shape/dtype 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.
- `low`: inclusive lower bound; default 0.0.
- `high`: exclusive upper bound; default 1.0.
- `device`: stream or device; default = `self`'s.

**Throws**

- `ClikaRT::Error`: (`INVALID_ARGUMENT`) when `high <= low`.

<div class="api-declared">

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

</div>
