divide#

Fully qualified name: isaacsim::common::array::divide

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

Divides two arrays element-wise using true division.

The operands are broadcast against each other (see subtract() for a description of the shared broadcasting and promotion rules). The result is always floating-point: it is float32 only when the promoted dtype of the operands is already float32, and float64 otherwise, so boolean and integer operands produce a float64 result. Division by zero therefore yields infinity or NaN rather than being undefined.

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 quotient.