UNPKG

@thi.ng/tensors

Version:

0D/1D/2D/3D/4D tensors with extensible polymorphic operations and customizable storage

17 lines (16 loc) 266 B
import { defOpRTT } from "./defoprtt.js"; const $swap = defOpRTT( (_, adata, bdata, ia, ib) => { const t = adata[ia]; adata[ia] = bdata[ib]; bdata[ib] = t; }, () => { }, void 0, false ); const swap = (a, b) => $swap(a, b); export { swap };