This would be helpful on axis 1 as well if that is not too much trouble. pylearn2 calculates these quantities quite frequently.