"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "GENERATED/PDL/IO/Misc.pm" between
PDL-2.074.tar.gz and PDL-2.075.tar.gz

About: PDL (Perl Data Language) aims to turn perl into an efficient numerical language for scientific computing (similar to IDL and MatLab).

Misc.pm  (PDL-2.074):Misc.pm  (PDL-2.075)
skipping to change at line 17 skipping to change at line 17
our %EXPORT_TAGS = (Func=>\@EXPORT_OK); our %EXPORT_TAGS = (Func=>\@EXPORT_OK);
use PDL::Core; use PDL::Core;
use PDL::Exporter; use PDL::Exporter;
use DynaLoader; use DynaLoader;
our @ISA = ( 'PDL::Exporter','DynaLoader' ); our @ISA = ( 'PDL::Exporter','DynaLoader' );
push @PDL::Core::PP, __PACKAGE__; push @PDL::Core::PP, __PACKAGE__;
bootstrap PDL::IO::Misc ; bootstrap PDL::IO::Misc ;
#line 8 "misc.pd" #line 7 "misc.pd"
use strict; use strict;
use warnings; use warnings;
=head1 NAME =head1 NAME
PDL::IO::Misc - misc IO routines for PDL PDL::IO::Misc - misc IO routines for PDL
=head1 DESCRIPTION =head1 DESCRIPTION
Some basic I/O functionality: FITS, tables, byte-swapping Some basic I/O functionality: FITS, tables, byte-swapping
=head1 SYNOPSIS =head1 SYNOPSIS
use PDL::IO::Misc; use PDL::IO::Misc;
=cut =cut
#line 42 "Misc.pm" #line 43 "Misc.pm"
=head1 FUNCTIONS =head1 FUNCTIONS
=cut =cut
#line 48 "misc.pd" #line 47 "misc.pd"
use PDL::Primitive; use PDL::Primitive;
use PDL::Types; use PDL::Types;
use PDL::Options; use PDL::Options;
use PDL::Bad; use PDL::Bad;
use Carp; use Carp;
use Symbol qw/ gensym /; use Symbol qw/ gensym /;
use List::Util; use List::Util;
use strict; use strict;
#line 66 "Misc.pm" #line 68 "Misc.pm"
#line 1059 "../../blib/lib/PDL/PP.pm" #line 1058 "../../blib/lib/PDL/PP.pm"
=head2 bswap2 =head2 bswap2
=for sig =for sig
Signature: (x(); ) Signature: (x(); )
=for ref =for ref
Swaps pairs of bytes in argument x() Swaps pairs of bytes in argument x()
=for bad =for bad
bswap2 does not process bad values. bswap2 does not process bad values.
It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
=cut =cut
#line 90 "Misc.pm" #line 93 "Misc.pm"
#line 1060 "../../blib/lib/PDL/PP.pm"
#line 1061 "../../blib/lib/PDL/PP.pm"
*bswap2 = \&PDL::bswap2; *bswap2 = \&PDL::bswap2;
#line 96 "Misc.pm" #line 100 "Misc.pm"
#line 1059 "../../blib/lib/PDL/PP.pm" #line 1058 "../../blib/lib/PDL/PP.pm"
=head2 bswap4 =head2 bswap4
=for sig =for sig
Signature: (x(); ) Signature: (x(); )
=for ref =for ref
Swaps quads of bytes in argument x() Swaps quads of bytes in argument x()
=for bad =for bad
bswap4 does not process bad values. bswap4 does not process bad values.
It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
=cut =cut
#line 120 "Misc.pm" #line 125 "Misc.pm"
#line 1060 "../../blib/lib/PDL/PP.pm"
#line 1061 "../../blib/lib/PDL/PP.pm"
*bswap4 = \&PDL::bswap4; *bswap4 = \&PDL::bswap4;
#line 126 "Misc.pm" #line 132 "Misc.pm"
#line 1059 "../../blib/lib/PDL/PP.pm" #line 1058 "../../blib/lib/PDL/PP.pm"
=head2 bswap8 =head2 bswap8
=for sig =for sig
Signature: (x(); ) Signature: (x(); )
=for ref =for ref
Swaps octets of bytes in argument x() Swaps octets of bytes in argument x()
=for bad =for bad
bswap8 does not process bad values. bswap8 does not process bad values.
It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
=cut =cut
#line 150 "Misc.pm" #line 157 "Misc.pm"
#line 1060 "../../blib/lib/PDL/PP.pm"
#line 1061 "../../blib/lib/PDL/PP.pm"
*bswap8 = \&PDL::bswap8; *bswap8 = \&PDL::bswap8;
#line 156 "Misc.pm" #line 164 "Misc.pm"
#line 125 "misc.pd" #line 124 "misc.pd"
# Internal routine to extend PDL array by size $n along last dimension # Internal routine to extend PDL array by size $n along last dimension
# - Would be nice to have a proper extend function rather than hack # - Would be nice to have a proper extend function rather than hack
# - Is a NO-OP when handed a perl ARRAY ref rather than an ndarray arg # - Is a NO-OP when handed a perl ARRAY ref rather than an ndarray arg
sub _ext_lastD { # Called by rcols and rgrep sub _ext_lastD { # Called by rcols and rgrep
my ($x,$n) = @_; my ($x,$n) = @_;
if (ref($_[0]) ne 'ARRAY') { if (ref($_[0]) ne 'ARRAY') {
my @nold = $x->dims; my @nold = $x->dims;
my @nnew = @nold; my @nnew = @nold;
$nnew[-1] += $n; # add $n to the last dimension $nnew[-1] += $n; # add $n to the last dimension
skipping to change at line 1167 skipping to change at line 1171
wantarray ? return(@ret) : return $ret[0]; wantarray ? return(@ret) : return $ret[0];
} }
=head2 isbigendian =head2 isbigendian
=for ref =for ref
Determine endianness of machine - returns 0 or 1 accordingly Determine endianness of machine - returns 0 or 1 accordingly
=cut =cut
#line 1212 "Misc.pm" #line 1221 "Misc.pm"
#line 1180 "misc.pd"
#line 1181 "misc.pd"
sub PDL::isbigendian { return 0; }; sub PDL::isbigendian { return 0; };
*isbigendian = \&PDL::isbigendian; *isbigendian = \&PDL::isbigendian;
#line 1219 "Misc.pm" #line 1229 "Misc.pm"
#line 1203 "misc.pd" #line 1202 "misc.pd"
=head2 rasc =head2 rasc
=for ref =for ref
Simple function to slurp in ASCII numbers quite quickly, Simple function to slurp in ASCII numbers quite quickly,
although error handling is marginal (to nonexistent). although error handling is marginal (to nonexistent).
=for usage =for usage
skipping to change at line 1279 skipping to change at line 1284
$im->getdim(0) != $nx or $im->getdim(1) != $ny ; $im->getdim(0) != $nx or $im->getdim(1) != $ny ;
} }
$tmp = $cube->slice(":,:,($k)"); $tmp = $cube->slice(":,:,($k)");
$tmp .= $im; $tmp .= $im;
$k++; $k++;
} }
return $cube; return $cube;
} }
#line 1329 "Misc.pm" #line 1340 "Misc.pm"
#line 1060 "../../blib/lib/PDL/PP.pm"
#line 1061 "../../blib/lib/PDL/PP.pm"
*_rasc = \&PDL::_rasc; *_rasc = \&PDL::_rasc;
#line 1335 "Misc.pm" #line 1347 "Misc.pm"
#line 28 "misc.pd" #line 27 "misc.pd"
=head1 AUTHOR =head1 AUTHOR
Copyright (C) Karl Glazebrook 1997, Craig DeForest 2001, Copyright (C) Karl Glazebrook 1997, Craig DeForest 2001,
2003, and Chris Marshall 2010. All rights reserved. There is 2003, and Chris Marshall 2010. All rights reserved. There is
no warranty. You are allowed to redistribute this software no warranty. You are allowed to redistribute this software
/ documentation under certain conditions. For details, see / documentation under certain conditions. For details, see
the file COPYING in the PDL distribution. If this file is the file COPYING in the PDL distribution. If this file is
separated from the PDL distribution, the copyright notice separated from the PDL distribution, the copyright notice
should be included in the file. should be included in the file.
=cut =cut
#line 1354 "Misc.pm" #line 1367 "Misc.pm"
# Exit with OK status # Exit with OK status
1; 1;
 End of changes. 26 change blocks. 
26 lines changed or deleted 32 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)