def _iqr_nanpercentile(x, q, axis=None, interpolation='linear', keepdims=False, contains_nan=False):
 if hasattr(np, 'nanpercentile'):
  result = np.nanpercentile(x, q, axis=axis, interpolation=interpolation, keepdims=keepdims)
  if ((result.ndim > 1) and (NumpyVersion(np.__version__) < '1.11.0a')):
   axis = np.asarray(axis)
   if (axis.size == 1):
    if (axis.ndim == 0):
     axis = axis[None]
    result = np.rollaxis(result, axis[0])
   else:
    result = np.rollaxis(result, (-1))
 else:
  msg = "Keyword nan_policy='omit' not correctly supported for numpy versions < 1.9.x. The default behavior of  numpy.percentile will be used."
  warnings.warn(msg, RuntimeWarning)
  result = _iqr_percentile(x, q, axis=axis)
 return result

def _iqr_nanpercentile ( x , q , axis = None , interpolation = 'linear' , keepdims = False , contains_nan = False ) : if hasattr ( np , 'nanpercentile' ) : result = np . nanpercentile ( x , q , axis = axis , interpolation = interpolation , keepdims = keepdims ) if ( ( result . ndim > 1 ) and ( NumpyVersion ( np . __version__ ) < '1.11.0a' ) ) : axis = np . asarray ( axis ) if ( axis . size == 1 ) : if ( axis . ndim == 0 ) : axis = axis [ None ] result = np . rollaxis ( result , axis [ 0 ] ) else : result = np . rollaxis ( result , ( - 1 ) ) else : msg = "Keyword nan_policy='omit' not correctly supported for numpy versions < 1.9.x. The default behavior of  numpy.percentile will be used." warnings . warn ( msg , RuntimeWarning ) result = _iqr_percentile ( x , q , axis = axis ) return result
private wrapper that works around the following: 1 .