Again copying the Numpy zeros_like and ones_like interface

constants_like(x, c)

Arguments

x

Object to imitiate

c

Value to fill imitation with

Value

Object of same shape and type as x filled with value c