I'm actually going to write a custom function as we also need to exclude ``inf``