creation
35 memberslucid.creationTensor construction, and the seeding of the default generator.
Thirty entry points: conversion (tensor, as_tensor, from_numpy), filled and *_like constructors, the range builders arange / linspace, the sampling family, the generator controls (seed, get_rng_state / set_rng_state, initial_seed, randperm) and DLPack exchange.
Every constructor takes device=, and passing it is what keeps a pipeline on one device: a helper built without it lands on the CPU and forces a round trip the moment it meets Metal data.
CPU and Metal share one default generator but consume it differently per draw — a CPU rand(4) advances its counter by 4, a Metal rand(4) by one block — so the same seed does not reproduce the same stream across devices; comparing them means comparing deterministic ops, replaying state with get_rng_state() / set_rng_state(), or eval() for anything stochastic.
Classes
Functions
tensor→ Tensoras_tensor→ Tensorasarray→ Tensorscalar_tensor→ Tensorfrom_numpy→ Tensorfrom_dlpack→ Tensorto_dlpack→ objectzeros→ Tensorones→ Tensorempty→ Tensorempty_strided→ Tensorfull→ Tensoreye→ Tensorarange→ Tensorlinspace→ Tensorzeros_like→ Tensorones_like→ Tensorempty_like→ Tensorfull_like→ Tensorlogspace→ Tensormanual_seed→ _C_engine.Generatorseed→ _intinitial_seed→ _intget_rng_state→ Tensorset_rng_state→ Nonebernoulli→ Tensorrand_like→ Tensorrandn_like→ Tensorrandint_like→ Tensorrandperm→ Tensornormal→ TensorReturn a tensor of samples drawn from a parametric normal distribution.
rand→ TensorReturn a tensor of samples drawn from the continuous uniform distribution.
randint→ TensorReturn a tensor of samples drawn from the discrete uniform distribution.
randn→ TensorReturn a tensor of samples drawn from the standard normal distribution.