---
title: "randomInPlace"
sidebar_label: "randomInPlace"
description: "Kotlin binding reference: randomInPlace."
---

<!-- Generated by tools/api_reference/generate_api_docs.py. Do not edit. -->

//[clika-runtime](../../../index.md)/[io.clika.runtime](../index.md)/[Ops](index.md)/[randomInPlace](randomInPlace.md)

# randomInPlace

[common]\
fun [randomInPlace](randomInPlace.md)(self: [Tensor](../Tensor/index.md), low: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)? = null, high: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)? = null, device: [Placement](../Placement/index.md)? = null): [Tensor](../Tensor/index.md)

`randomInPlace(self: Tensor, low: Long? = null, high: Long? = null, device: Placement? = null)`: the `random_` operator. In-place uniform-INTEGER fill: overwrites `self` with draws from `[low, high)`. `low` and `high` come both or neither; with both absent, the range is the dtype's full representable-integer span. A view input writes through its base storage. Returns `self` for chaining. Writes through `self` and returns it, so calls chain.