Closed
Description
In the current implementation, when no solution is returned by roots, the function return np.nan. But if no real solution is returned, the function fails with an exception:
ValueError: attempt to get argmin of an empty sequence
The proposed fix is to add the following to https://github.com/numpy/numpy/blob/master/numpy/lib/financial.py#L654
if res.size == 0 or res[mask].size == 0: