module

composite

75 members
lucid.ops.composite

Functions

fnabsoluteTensor

Element-wise absolute value.

fnacoshTensor

Inverse hyperbolic cosine.

fnaddbmmTensor

Batched matmul with reduction over the batch axis.

fnaddcdivTensor

Element-wise fused divide-add.

fnaddcmulTensor

Element-wise fused multiply-add with a scalar weight.

fnaddmmTensor

General matrix multiply with a scaled accumulator (GEMM).

fnaddmvTensor

Matrix-vector multiply with a scaled accumulator (BLAS-2 gemv).

fnaddrTensor

Rank-1 update of a matrix by an outer product (BLAS-2 ger).

fnadjointTensor

Conjugate (Hermitian) transpose of the trailing two dimensions.

fnangleTensor

Phase angle (argument) of a complex tensor.

fnarccoshTensor

Inverse hyperbolic cosine.

fnarcsinhTensor

Inverse hyperbolic sine.

fnarctan2Tensor

Quadrant-correct two-argument arctangent.

fnarctanhTensor

Inverse hyperbolic tangent.

fnasinhTensor

Inverse hyperbolic sine.

fnatanhTensor

Inverse hyperbolic tangent.

fnatleast_1dTensor | tuple[Tensor, ...]

Promote each input to at least 1 dimension.

fnatleast_2dTensor | tuple[Tensor, ...]

Promote each input to at least 2 dimensions.

fnatleast_3dTensor | tuple[Tensor, ...]

Promote each input to at least 3 dimensions.

fnbaddbmmTensor

Batched GEMM with a batched accumulator.

fnblock_diagTensor

Construct a block-diagonal matrix from a sequence of blocks.

fncan_castbool

Predicate: can `from_dtype` be safely cast to `to_dtype`?

fncolumn_stackTensor

Stack tensors as columns of a 2-D matrix.

fnconj_physicalTensor

Eagerly materialised complex conjugate.

fndivideTensor

Element-wise true division.

fndsplitlist[Tensor]

Split a tensor along its third (depth) axis.

fndstackTensor

Stack tensors along the third (depth) axis.

fnexpm1Tensor

Element-wise $e^{x} - 1$.

fnfloat_powerTensor

Element-wise power that always promotes operands to `float64`.

fnfmaxTensor

Element-wise NaN-quiet maximum.

fnfminTensor

Element-wise NaN-quiet minimum.

fngerTensor

Outer product of two 1-D tensors.

fnheavisideTensor

Heaviside step function with a user-selectable value at $x = 0$.

fnhsplitlist[Tensor]

Split a tensor horizontally (along axis 1 for rank $\geq 2$).

fnis_conjbool

Predicate: does the tensor carry a lazy "conjugated" flag?

fnis_negbool

Predicate: does the tensor carry a lazy "negated" flag?

fnis_nonzerobool

Predicate: is a single-element tensor non-zero?

fnis_same_sizebool

Predicate: do two tensors have identical shapes?

fnis_storagebool

Predicate: is the object a separate Storage container?

fnisinTensor

Per-element set-membership test.

fnisneginfTensor

Element-wise test for negative infinity.

fnisposinfTensor

Element-wise test for positive infinity.

fnisrealTensor

Element-wise test for real-valued entries.

fnlogitTensor

Logit function — inverse of the logistic sigmoid.

fnmoveaxisTensor

Move one or more axes to new positions.

fnmultiplyTensor

Element-wise product.

fnmvTensor

Matrix-vector product.

fnnanmeanTensor

Mean of the tensor, ignoring NaN entries.

fnnanmedianTensor

Median of a tensor, ignoring NaN entries.

fnnansumTensor

Sum the tensor, treating NaN entries as zero.

fnnegativeTensor

Element-wise negation.

fnnumelint

Return the total number of elements in a tensor.

fnpolarTensor

Build a complex tensor from polar coordinates (magnitude, phase).

fnpositiveTensor

Element-wise identity — returns the input unchanged.

fnpromote_typesDType

Compute the joint promotion of two dtypes.

fnresolve_conjTensor

Materialise any pending lazy conjugation — no-op in Lucid.

fnresolve_negTensor

Materialise any pending lazy negation — no-op in Lucid.

fnresult_typeDType

Compute the dtype that a binary operation on the inputs would produce.

fnrot90Tensor

Rotate a tensor by 90° in a chosen plane.

fnrow_stackTensor

Stack tensors as rows — alias of `lucid.vstack`.

fnrsubTensor

Reverse subtraction: $b - \alpha \cdot a$.

fnsignbitTensor

Element-wise sign-bit predicate.

fnsincTensor

Normalised sinc function with the standard removable singularity at 0.

fnsubtractTensor

Element-wise subtraction with an optional scalar multiplier.

fnswapaxesTensor

Return `x` with axes `axis0` and `axis1` exchanged.

fnswapdimsTensor

Swap two named dimensions of a tensor.

fntTensor

Short-form transpose for tensors of rank at most 2.

fntake_along_dimTensor

Gather elements from `x` at positions `indices` along `dim`.

fntensor_splitlist[Tensor]

Split a tensor along `dim`, permitting unequal final-piece sizes.

fntrue_divideTensor

Element-wise true (floating-point) division.

fnvdotTensor

Vector dot product (complex-conjugating on the first argument).

fnview_as_complexTensor

Reinterpret a real tensor with a trailing pair axis as a complex tensor.

fnview_as_realTensor

Reinterpret a complex tensor as a real tensor with a trailing pair axis.

fnvsplitlist[Tensor]

Split a tensor along its first (vertical) axis.

fnxlogyTensor

Compute $x \log y$ with the convention $0 \cdot \log 0 = 0$.