Modified the interpretation of the axis argument.

It is now the axis of the array resulting from broadcasting f_obs
and f_exp.

Also simplified the code a bit.