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

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

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

# ndim

[common]\
fun [ndim](ndim.md)(input: [Tensor](../Tensor/index.md)): [Tensor](../Tensor/index.md)

`ndim(input: Tensor)`: the `ndim` operator. The tensor's rank as a 0-D Int64 tensor. The value is produced ON DEVICE and is traceable; under tracing it carries the symbolic value. For a plain host integer use the `*_host` sibling instead.