Hi all,

Was wondering if there’s an easy way to remove `+-inf`

(infinity) values from an OpenCV Matrix.

I tried `patchNaNs()`

, but it appears that only works for `NaN`

values, and `inf`

is not a `NaN`

:

```
>>> np.isnan(float("inf"))
False
```

It looks like someone else asked a similar question on GitHub. Their solution is to iterate through the whole matrix.

Is there an easier way?