MOD: observation weight

Modifying this (private) function to work for either np.ndarray or
np.ma.core.MaskedArray arrays.