def p16(s, v): try: return np.nanpercentile(v, 16) except AttributeError: return np.percentile(v, 16)