add#

Fully qualified name: isaacsim::common::array::add

Array isaacsim::common::array::add(const Array &a, const Array &b)#

Adds two arrays element-wise.

The operands are broadcast against each other and cast to their common promoted dtype (see subtract() for a description of the shared broadcasting and promotion rules). Boolean operands are added as a logical OR.

Parameters:
  • a – [in] Left-hand operand.

  • b – [in] Right-hand operand.

Throws:

std::invalid_argument – if the operands reside on different devices or their shapes are not broadcast-compatible.

Returns:

A new Array holding the element-wise sum.