We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When trying to retrieve an item from an empty series, Deedle throws
System.InvalidOperationException: 'OptionalValue.Value: Value is not available'
rather than an IndexOutOfBoundsException. This misleading exception caused me to spend a lot of time trying to find the problem.
IndexOutOfBoundsException
Repro using NUnit:
[TestCase(true, new object[] { "foo", null})] public void SeriesBrokenTest(bool shouldThrow, object[] pairs) { var dict = arrayToDictionary<string, double?>(pairs); var series = dict.ToSeries(); Assert.Throws<Exception>(() => { var newSeries = series.Where(k => k.Value != null).Sort(); var item = newSeries.GetAt(0); //Throws wrong exception here }); } private Dictionary<K, V> arrayToDictionary<K, V>(object[] pairs) { var dict = new Dictionary<K, V>(); for (var i = 0; i < pairs.Length - 1; i += 2) { dict.Add((K)pairs[i], (V)pairs[i + 1]); } return dict; }
The text was updated successfully, but these errors were encountered:
fixed in #437
Sorry, something went wrong.
No branches or pull requests
When trying to retrieve an item from an empty series, Deedle throws
rather than an
IndexOutOfBoundsException
. This misleading exception caused me to spend a lot of time trying to find the problem.Repro using NUnit:
The text was updated successfully, but these errors were encountered: