(rontolisp) docs
← linalg Package 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 and a packed bfloat16 (#bf16) one a #bf16 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.