weight (array, optional) -- A multiplicative weight to scale the result by.
The weight should be one-dimensional with the same size
as the last axis of x. If set to None then no scaling happens.
eps (float) -- A small additive constant for numerical stability.