---
title: "ClikaRT::ops::copysign"
sidebar_label: "copysign"
description: "Elementwise |a| carrying the sign of other. Broadcasts and promotes as add. the broadcast-shaped result at the promoted dtype."
---

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

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

## copysign() {#copysign}

<div class="api-signature">

[`Tensor`](../Tensor.md) **`copysign`**([`Tensor`](../Tensor.md) `input`, [`ScalarOrTensor`](../ScalarOrTensor.md) `other`)

</div>

Elementwise `|a|` carrying the sign of `other`. Broadcasts and promotes as [`add`](./add.md#add).

**Returns:** the broadcast-shaped result at the promoted dtype.

**Throws**

- `ClikaRT::Error`: (`INVALID_ARGUMENT`) when the operand shapes are not broadcast-compatible.

<div class="api-declared">

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

</div>
