warp.full#

warp.full(
shape=None,
value=0,
dtype=Any,
device=None,
requires_grad=False,
pinned=False,
**kwargs,
)[source]#

Return an array with all elements initialized to the given value

Parameters:
  • shape (int | tuple[int, ...] | list[int] | None) – Array dimensions

  • value – Element value

  • dtype – Type of each element, e.g.: float, warp.vec3, warp.mat33, etc

  • device (Device | str | None) – Device that array will live on

  • requires_grad (bool) – Whether the array will be tracked for back propagation

  • pinned (bool) – Whether the array uses pinned host memory (only applicable to CPU arrays)

Returns:

A warp.array object representing the allocation

Return type:

array