ones
Fully qualified name: isaacsim::common::array::ones
-
Array isaacsim::common::array::ones(
- const Shape &shape,
- Dtype dtype = Dtype::Float64(),
- const Device &device = Device::Cpu(),
)
Creates an array of the given shape with every element set to one.
The value is cast to dtype, so the elements are true for bool, 1 for the integers, and 1.0 for float32 and float64.
- Parameters:
shape – [in] Shape of the new array. An empty shape produces a 0-D array holding one element.
dtype – [in] Element type. Defaults to float64.
device – [in] Device on which to allocate. Defaults to the CPU.
- Returns:
A new Array whose elements are all one.