You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Microsoft.ML.Core\Utilities\DoubleParser.cs near lines 143 and 195
intichEnd;if(!DoubleParser.TryParse(span.Slice(ich,span.Length-ich),outvalue,outichEnd,flags)){value=default(Double);returnResult.Error;}// Make sure everything was consumed.while(ichEnd<span.Length){if(!char.IsWhiteSpace(span[ichEnd]))returnResult.Extra;ichEnd++;}
the ichEnd is indexed on the sliced span.
If ich is not 0 there will be an offset when for "ichEnd < span.Length" and "span[ichEnd]"
Example : for an input like " 1.234 " the method will return Result.Extra
Pössible solutions:
ichEnd += ich;
modify the tryparse to accept an offset and use the original span
Activity
rosebyte commentedon Oct 22, 2026
Triage: there is a pr fixing this.