pymoose.zeros#

pymoose.zeros(shape, dtype, placement=None)[source]#

Embed a zeros array into the Moose computation graph.

Equivalent to pm.constant(np.zeros(shape, dtype)) for a given dtype and shape.

Parameters
  • shape – Shape of the zeros array.

  • dtype – Dtype of the zeros array.

  • placement – An optional Placement to pin this operation to.

Returns

A tensor of all 0s with given shape and dtype.