(rontolisp) docs
← Functions

linalg:zeros-like

(linalg:zeros-like array)

Creates a zero-filled array with the input's shape and element width (numpy's np.zeros_like): a packed single-float (#f) input gives a #f result, anything else a packed double-float one. Unlike linalg:zeros, which takes a shape designator, it takes the array whose shape is wanted -- the gradient-accumulator idiom.