Speed up DataTransformer (#122)

This commit is contained in:
Marcin Michalski 2017-09-02 21:38:02 +02:00 committed by Arkadiusz Kondas
parent b1be0574d8
commit 03751f51ed

View File

@ -57,7 +57,7 @@ class DataTransformer
$numericLabels = self::numericLabels($labels);
$results = [];
foreach (explode(PHP_EOL, $rawPredictions) as $result) {
if (strlen($result) > 0) {
if (isset($result[0])) {
$results[] = array_search($result, $numericLabels);
}
}