fn
uniform_op
→TensorImplPtrint uniform_op(const int & shape, double low, double high, Dtype dt, Device device, Generator * gen)Python wrappers
Public Python APIs implemented by this engine symbol.Allocates a tensor filled with uniform samples on .
Math
See Also
rand_op — convenience shortcut for .
Parameters
shapeconst Shape&Shape of the output tensor.
lowdoubleInclusive lower bound of the support.
highdoubleExclusive upper bound of the support. Must be strictly greater than
low.dtDtypeElement dtype. Floating-point only.
deviceDeviceMemory domain (
CPU or GPU).Bit-stream state; falls back to
default_generator on nullptr.Returns
TensorImplPtrNewly allocated leaf tensor (requires_grad = false).
Raises
LucidErrorIf
high <= low — surfaced as ValueError on the Python side.