This repository was archived by the owner on Nov 19, 2020. It is now read-only.

Description
Hello,
I think this should be gracefully handled in .First method.
Here's what I have...
I need to find an index of a specific Point.X in an array of Points. So I use this expression:
double myX = 700;
int index = fft.First(p => p.X >= myX);
It works just fine if myX isn't grater than the maximum Point.X in fft array. But if my fft array Point.X is less than myX, I get an exception:
System.IndexOutOfRangeException occurred
HResult=-2146233080
Message=Index was outside the bounds of the array.
Source=Accord.Math
StackTrace:
at Accord.Math.Matrix.First[T](T[] data, Func`2 func)
InnerException:
What is the easiest/elegant "patch" I can do for now?
Thank you!
Edit: Just in case, this is using Accord.Math 3.4.0.0