bayespy.utils.misc.put_simple

bayespy.utils.misc.put_simple(y, indices, axis=-1, length=None)[source]

An inverse operation of np.take with accumulation and broadcasting.

Compared to put, the difference is that the result array is initialized with an array of zeros whose shape is determined automatically and np.add is used as the accumulator.