warp.full_like#
- warp.full_like(src, value, device=None, requires_grad=None, pinned=None)[source]#
Return an array with all elements initialized to the given value with the same type and dimension of another array
- Parameters:
src (Array) – The template array to use for shape, data type, and device
value (Any) – Element value
device (Device | str | None) – The device where the new array will be created (defaults to src.device)
requires_grad (bool | None) – Whether the array will be tracked for back propagation
pinned (bool | None) – Whether the array uses pinned host memory (only applicable to CPU arrays)
- Returns:
A warp.array object representing the allocation
- Return type: