Detect range even if the array has nan values using bottlenck if available

Modify quickMinMax to handle also numpy arrays with nan values, for performance reasons bottleneck is used if available.