---
title: "ClikaRT::ops::atleast_1d"
sidebar_label: "atleast_1d"
description: "input with leading size-1 dims prepended until rank >= 1; a higher-rank input passes through unchanged. Returns a VIEW sharing input's storage (no copy)."
---

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

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

## atleast\_1d() {#atleast_1d}

<div class="api-signature">

[`Tensor`](../Tensor.md) **`atleast_1d`**([`Tensor`](../Tensor.md) `input`)

</div>

`input` with leading size-1 dims prepended until rank \>= 1; a higher-rank input passes through unchanged. Returns a VIEW sharing `input`'s storage (no copy).

**Throws**

- `ClikaRT::Error`: when the input's dtype is not served for this operation (the machine-readable reason rides `code_name()`).

**Returns:** a view of `input` with rank \>= 1.

<div class="api-declared">

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

</div>
