Group
Extension

Matches 11

PDL ( E/ET/ETJ/PDL-2.087.tar.gz, ETJ, 2024; MetaCPAN )
PDL/t/core.t ( view source; MetaCPAN )
 'error on PDL->obj_method';

{
my $p = sequence(3);
my $p2 = sequence(2);
eval {$p->set(1,$p2)};
isnt $@, '', 'set(..., $multi_elt) should error';
}

{
my $p = sequence(5);
is Devel::Peek::SvREFCNT($
my $y = zeroes(1,3); $y .= sequence(2,3); };
isnt $@, '', 'scaling-up of output dim 1 throws error';
eval { my $y = zeroes(1); $y .= zeroes(0) + 1; };
isnt $@, '', 'scaling-down of output dim 1 throws
x == pdl(1,2,3))), "topdl(1,2,3) returns a 3-ndarray containing (1,2,3)");
eval {PDL->topdl({})};
isnt $@, '', 'topdl({}) no segfault';

# stringification
{
my $x = sequence( 3 + 1e7 );
my $x_indx = w
PDL ( E/ET/ETJ/PDL-2.087.tar.gz, ETJ, 2024; MetaCPAN )
PDL/t/pdl_from_string.t ( view source; MetaCPAN )
 croaking on arbitrary bare-words:
eval {pdl q[1 foobar 2]};
isnt($@, '', 'croaks on arbitrary string input');
eval {pdl q[$a $b $c]};
isnt($@, '', 'croaks with non-interpolated strings');

# Install 
1 l 3] };
isnt($@, '', 'Croaks when invalid character is specified');
like($@, qr/found disallowed character\(s\) 'l'/, 'Gives meaningful explanation of problem');
eval{ pdl q[1 po 3] };
isnt($@, '', 
l{ pdl q[1 +-2 3] };
isnt($@, '', 'Croaks when it finds consecutive signs');
like($@, qr/found a \w+ sign/, 'Gives meaningful explanation of problem');
eval{ pdl q[1 -+2 3] };
isnt($@, '', 'Croaks whe
PDL ( E/ET/ETJ/PDL-2.087.tar.gz, ETJ, 2024; MetaCPAN )
PDL/t/ufunc.t ( view source; MetaCPAN )
dn't segfault!
is $ind_double.'', '[3 0 2 4 1]';

eval { empty()->medover }; # shouldn't segfault
isnt $@, '', 'exception for percentile on empty ndarray';

# set up test arrays
#
my $x = pdl(0,0,6,3,
,5]]);
my $e_sort = $e->qsortvec;

eval { sequence(3, 3)->medover(my $o = null, my $t = null); };
isnt $@, '', 'a [t] Par cannot be passed';

my $med_dim = 1000;
ok tapprox(sequence(10,$med_dim,$med_d
random(15)->qsort(5); };
isnt($@, '', "qsort extra argument");
eval { random(15)->qsorti(5); };
isnt($@, '', "qsorti extra argument");
eval {random(10,4)->qsortvec(5); };
isnt($@, '', "qsortvec extra 
PDL ( E/ET/ETJ/PDL-2.087.tar.gz, ETJ, 2024; MetaCPAN )
PDL/t/01-pptest.t ( view source; MetaCPAN )
null));
ok( tapprox($vaff,$y) )
  or diag ($vaff, $vaff->dump);

eval { foop($x,($y=pdl([1]))) };
isnt $@, '', '[phys] with multi-used mismatched dim of 1 throws exception';

eval { foop(pdl([1]),($y=
 [$v0,$v1], [5,7], 'output OtherPars work 1a';
eval { output_op(sequence(2,3), my $v0, my $v1) };
isnt $@, '', 'broadcast with output OtherPars throws';

output_op2([5,7], my $n=PDL->null, my $v0_2, m
o", 0;
incomp_in($o = PDL->null, undef);
is "$o", 0;
eval { incomp_in($o = PDL->null, 'hello') };
isnt $@, '';

incomp_out(sequence(3), 2, my $nds);
is 0+@$nds, 2;
is +($nds->[0]//'undef').'', "[0 1 2
PDL ( E/ET/ETJ/PDL-2.087.tar.gz, CHM, 2024; MetaCPAN )
PDL/t/proj_transform.t ( view source; MetaCPAN )
 +lon_0=0 +datum=WGS84";
   my $proj = eval { t_proj( proj_params => $eqc_opts ) };
   isnt $proj, undef;
   isnt $proj->proj_params, undef;
   my $eqc = eval { $map->map( $proj, $map_size ) };
   if 
;
   my $proj = eval { no strict 'refs'; $alias->( proj_params => $eqc_opts ) };
   is $@, '';
   isnt $proj, undef;
}

sub get_ref_robin_slices {
    my @slices = ();
    push(@slices, <<"END");

[
 
PDL ( E/ET/ETJ/PDL-2.087.tar.gz, CHM, 2024; MetaCPAN )
PDL/t/lut.t ( view source; MetaCPAN )
re tests => 8;

use PDL::LiteF;
use PDL::Types;
use PDL::Graphics::LUT;

my @names = lut_names();
isnt scalar(@names), 0, "lut_names returns non-empty list";

my @cols = lut_data( $names[0] );
is( sca
2[3])), "reverse lut works");

# check we know about the intensity ramps
my @ramps = lut_ramps();
isnt scalar(@ramps), 0, "lut_ramps returns some ramps";

# load in a different intensity ramp
my @cols
PDL ( E/ET/ETJ/PDL-2.087.tar.gz, ETJ, 2024; MetaCPAN )
PDL/t/math.t ( view source; MetaCPAN )
st inplace
my $pa = pdl(0.5,0.0);
$pa->inplace->bessj0;
eval { $pa->inplace->bessj0(PDL->null) };
isnt $@, '', 'check providing explicit output arg to inplace throws exception';
ok( tapprox($pa,pdl(0.
PDL ( E/ET/ETJ/PDL-2.087.tar.gz, CHM, 2024; MetaCPAN )
PDL/t/func.t ( view source; MetaCPAN )
nterpolation');

# check we trap a call to an unavailable method
eval { $obj->gradient( $xi ); };
isnt( $@ , '' ,'calling unavailable method'); # 5

## Test: Hermite
#
exit unless $slatec;

$x = seque
PDL ( E/ET/ETJ/PDL-2.087.tar.gz, ETJ, 2024; MetaCPAN )
PDL/t/basic.t ( view source; MetaCPAN )
.01,16.9,16.1,15.2,15.4,16.2,15.4,16.2,16.4];
eval { hist ($x,15,15,0.1) }; # shouldn't segfault!
isnt $@, '', 'error thrown';
my ($hx,$h) = hist ($x,15,17,0.1);
ok( tapprox($hx, pdl(qw/15.05   15.15 
PDL ( E/ET/ETJ/PDL-2.087.tar.gz, ETJ, 2024; MetaCPAN )
PDL/t/bad.t ( view source; MetaCPAN )
), 'BAD', 'can convert PDL to string' );
is( $x->at, 'BAD', 'at() returns BAD for a bad value' );
isnt( $x->sclr, 'BAD', 'sclr() ignores bad value' );

$x = pdl 4;
$x->badflag(1);
$x->badvalue(4);
is(
PDL ( E/ET/ETJ/PDL-2.087.tar.gz, ETJ, 2024; MetaCPAN )
PDL/t/pp_croaking.t ( view source; MetaCPAN )
,
    OtherPars => 'int b; int c',
    OtherParsDefaults => { b => 0 },
    Code => q{;},
  );
};
isnt $@, '', 'error to give default for non-last params';

eval { pp_def( "func", Code => ';',
  Pars 

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.