astropy.utils
astropy.utils.masked
Like numpy.nanprod, skipping masked values as well.
numpy.nanprod
Masked/NaN values are replaced with 1. The output is not masked.