File: common.plt

package info (click to toggle)
libpdl-ccs-perl 1.24.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 612 kB
  • sloc: perl: 2,720; makefile: 3; ansic: 3
file content (34 lines) | stat: -rw-r--r-- 692 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# -*- Mode: CPerl -*-
# File: CCS/t/common.plt
# Description: common subs & data for PDL/CCS/t/*.t

##-- common subs
BEGIN {
  use File::Basename;
  use Cwd;
  my $topdir = Cwd::abs_path(dirname(__FILE__)."/../..");
  do "$topdir/t/common.plt" or die("$0: failed to load $topdir/t/common.plt: $@");
}

##-- common modules
use PDL;

#-- common data
our $a = pdl(double, [
		      [10,0,0,0,-2],
		      [3,9,0,0,0],
		      [0,7,8,6,0],
		      [3,0,8,7,5],
		      [0,8,0,9,7],
		      [0,4,0,0,2],
		     ]);
our $abad   = ($a==0);
our $agood  = !$abad;
our $awhich = $a->whichND;
our $avals  = $a->indexND($awhich);

our $BAD = pdl(0)->setvaltobad(0);

print "loaded ", __FILE__, "\n";

1;