Skip to content

Commit

Permalink
workaround for failing bandover,borover tests under PDL-2.096
Browse files Browse the repository at this point in the history
  • Loading branch information
moocow-the-bovine committed Jan 2, 2025
1 parent 52d5270 commit 07bb416
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions CCS/t/03_ufuncs.t
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,16 @@ sub test_ufunc {
my $ccs_ufunc = PDL::CCS::Nd->can("${ufunc_name}")
or die("no CCS Ufunc PDL::CCS::Nd::${ufunc_name} defined!");

if ($ufunc_name =~ /^b?(and|or)/) {
# workaround for https://github.com/moocow-the-bovine/PDL-CCS/issues/18; failing with
# # Failed test 'bandover:missing=BAD:type' at CCS/t/03_ufuncs.t line 103.
# # got: 'sbyte'
# # expected: 'longlong'
$a = $a->long;
} else {
$a = $a->double;
}

$missing_val = 0 if (!defined($missing_val));
$missing_val = PDL->topdl($a->type, $missing_val);
if ($missing_val->isbad) { $a = $a->setbadif($abad); }
Expand Down

0 comments on commit 07bb416

Please sign in to comment.