Skip to content

Commit 6ff4106

Browse files
committed
refactor a little bit
1 parent 8d01295 commit 6ff4106

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lib/Data/Frame/Util.pm

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,10 +164,8 @@ fun guess_and_convert_to_pdl ( (ArrayRef | Value | ColumnLike) $x,
164164
$strings_as_factors
165165
? PDL::Factor->new($x)
166166
: PDL::SV->new($x);
167-
my @is_bad = List::AllUtils::indexes { &$is_na($_) } @$x;
168-
if (@is_bad) {
169-
$piddle = $piddle->setbadif( pdl( \@is_bad ) );
170-
}
167+
my $is_bad = pdl( [ map { &$is_na($_) } @$x ] );
168+
$piddle = $piddle->setbadif($is_bad);
171169
return $piddle;
172170
}
173171
}

0 commit comments

Comments
 (0)