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

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

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

# onesLike

[common]\
fun [onesLike](onesLike.md)(reference: [Tensor](../Tensor/index.md), device: [Placement](../Placement/index.md)? = null): [Tensor](../Tensor/index.md)

`onesLike(reference: Tensor, device: Placement? = null)`: the `ones_like` operator. A one-filled tensor with `reference`'s shape and dtype (data never read); `device` absent = the reference's own device.