added: collapse function (on several dims), reshape, weight attribute to
axes, and weighted_mean