Ufunc.pm (PDL-2.080) | : | Ufunc.pm (PDL-2.081) | ||
---|---|---|---|---|
skipping to change at line 53 | skipping to change at line 53 | |||
=cut | =cut | |||
use PDL::Slices; | use PDL::Slices; | |||
use Carp; | use Carp; | |||
#line 55 "Ufunc.pm" | #line 55 "Ufunc.pm" | |||
=head1 FUNCTIONS | =head1 FUNCTIONS | |||
=cut | =cut | |||
#line 1058 "../../blib/lib/PDL/PP.pm" | #line 949 "../../blib/lib/PDL/PP.pm" | |||
=head2 prodover | =head2 prodover | |||
=for sig | =for sig | |||
Signature: (a(n); int+ [o]b()) | Signature: (a(n); int+ [o]b()) | |||
=for ref | =for ref | |||
Project via product to N-1 dimensions | Project via product to N-1 dimensions | |||
skipping to change at line 87 | skipping to change at line 87 | |||
$spectrum = prodover $image->transpose | $spectrum = prodover $image->transpose | |||
=for bad | =for bad | |||
prodover processes bad values. | prodover processes 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 109 "Ufunc.pm" | #line 109 "Ufunc.pm" | |||
#line 1060 "../../blib/lib/PDL/PP.pm" | #line 951 "../../blib/lib/PDL/PP.pm" | |||
*prodover = \&PDL::prodover; | *prodover = \&PDL::prodover; | |||
#line 116 "Ufunc.pm" | #line 116 "Ufunc.pm" | |||
#line 1058 "../../blib/lib/PDL/PP.pm" | #line 949 "../../blib/lib/PDL/PP.pm" | |||
=head2 cprodover | =head2 cprodover | |||
=for sig | =for sig | |||
Signature: (a(n); cdouble [o]b()) | Signature: (a(n); cdouble [o]b()) | |||
=for ref | =for ref | |||
Project via product to N-1 dimensions | Project via product to N-1 dimensions | |||
skipping to change at line 129 | skipping to change at line 129 | |||
precision. | precision. | |||
=for bad | =for bad | |||
cprodover processes bad values. | cprodover processes 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 161 "Ufunc.pm" | #line 161 "Ufunc.pm" | |||
#line 1060 "../../blib/lib/PDL/PP.pm" | #line 951 "../../blib/lib/PDL/PP.pm" | |||
*cprodover = \&PDL::cprodover; | *cprodover = \&PDL::cprodover; | |||
#line 168 "Ufunc.pm" | #line 168 "Ufunc.pm" | |||
#line 1058 "../../blib/lib/PDL/PP.pm" | #line 949 "../../blib/lib/PDL/PP.pm" | |||
=head2 dprodover | =head2 dprodover | |||
=for sig | =for sig | |||
Signature: (a(n); double [o]b()) | Signature: (a(n); double [o]b()) | |||
=for ref | =for ref | |||
Project via product to N-1 dimensions | Project via product to N-1 dimensions | |||
skipping to change at line 170 | skipping to change at line 170 | |||
Unlike L</prodover>, the calculations are performed in double precision. | Unlike L</prodover>, the calculations are performed in double precision. | |||
=for bad | =for bad | |||
dprodover processes bad values. | dprodover processes 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 212 "Ufunc.pm" | #line 212 "Ufunc.pm" | |||
#line 1060 "../../blib/lib/PDL/PP.pm" | #line 951 "../../blib/lib/PDL/PP.pm" | |||
*dprodover = \&PDL::dprodover; | *dprodover = \&PDL::dprodover; | |||
#line 219 "Ufunc.pm" | #line 219 "Ufunc.pm" | |||
#line 1058 "../../blib/lib/PDL/PP.pm" | #line 949 "../../blib/lib/PDL/PP.pm" | |||
=head2 cumuprodover | =head2 cumuprodover | |||
=for sig | =for sig | |||
Signature: (a(n); int+ [o]b(n)) | Signature: (a(n); int+ [o]b(n)) | |||
=for ref | =for ref | |||
Cumulative product | Cumulative product | |||
skipping to change at line 212 | skipping to change at line 212 | |||
$spectrum = cumuprodover $image->transpose | $spectrum = cumuprodover $image->transpose | |||
=for bad | =for bad | |||
cumuprodover processes bad values. | cumuprodover processes 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 266 "Ufunc.pm" | #line 266 "Ufunc.pm" | |||
#line 1060 "../../blib/lib/PDL/PP.pm" | #line 951 "../../blib/lib/PDL/PP.pm" | |||
*cumuprodover = \&PDL::cumuprodover; | *cumuprodover = \&PDL::cumuprodover; | |||
#line 273 "Ufunc.pm" | #line 273 "Ufunc.pm" | |||
#line 1058 "../../blib/lib/PDL/PP.pm" | #line 949 "../../blib/lib/PDL/PP.pm" | |||
=head2 dcumuprodover | =head2 dcumuprodover | |||
=for sig | =for sig | |||
Signature: (a(n); double [o]b(n)) | Signature: (a(n); double [o]b(n)) | |||
=for ref | =for ref | |||
Cumulative product | Cumulative product | |||
skipping to change at line 256 | skipping to change at line 256 | |||
Unlike L</cumuprodover>, the calculations are performed in double precision. | Unlike L</cumuprodover>, the calculations are performed in double precision. | |||
=for bad | =for bad | |||
dcumuprodover processes bad values. | dcumuprodover processes 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 320 "Ufunc.pm" | #line 320 "Ufunc.pm" | |||
#line 1060 "../../blib/lib/PDL/PP.pm" | #line 951 "../../blib/lib/PDL/PP.pm" | |||
*dcumuprodover = \&PDL::dcumuprodover; | *dcumuprodover = \&PDL::dcumuprodover; | |||
#line 327 "Ufunc.pm" | #line 327 "Ufunc.pm" | |||
#line 1058 "../../blib/lib/PDL/PP.pm" | #line 949 "../../blib/lib/PDL/PP.pm" | |||
=head2 sumover | =head2 sumover | |||
=for sig | =for sig | |||
Signature: (a(n); int+ [o]b()) | Signature: (a(n); int+ [o]b()) | |||
=for ref | =for ref | |||
Project via sum to N-1 dimensions | Project via sum to N-1 dimensions | |||
skipping to change at line 295 | skipping to change at line 295 | |||
$spectrum = sumover $image->transpose | $spectrum = sumover $image->transpose | |||
=for bad | =for bad | |||
sumover processes bad values. | sumover processes 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 371 "Ufunc.pm" | #line 371 "Ufunc.pm" | |||
#line 1060 "../../blib/lib/PDL/PP.pm" | #line 951 "../../blib/lib/PDL/PP.pm" | |||
*sumover = \&PDL::sumover; | *sumover = \&PDL::sumover; | |||
#line 378 "Ufunc.pm" | #line 378 "Ufunc.pm" | |||
#line 1058 "../../blib/lib/PDL/PP.pm" | #line 949 "../../blib/lib/PDL/PP.pm" | |||
=head2 csumover | =head2 csumover | |||
=for sig | =for sig | |||
Signature: (a(n); cdouble [o]b()) | Signature: (a(n); cdouble [o]b()) | |||
=for ref | =for ref | |||
Project via sum to N-1 dimensions | Project via sum to N-1 dimensions | |||
skipping to change at line 337 | skipping to change at line 337 | |||
precision. | precision. | |||
=for bad | =for bad | |||
csumover processes bad values. | csumover processes 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 423 "Ufunc.pm" | #line 423 "Ufunc.pm" | |||
#line 1060 "../../blib/lib/PDL/PP.pm" | #line 951 "../../blib/lib/PDL/PP.pm" | |||
*csumover = \&PDL::csumover; | *csumover = \&PDL::csumover; | |||
#line 430 "Ufunc.pm" | #line 430 "Ufunc.pm" | |||
#line 1058 "../../blib/lib/PDL/PP.pm" | #line 949 "../../blib/lib/PDL/PP.pm" | |||
=head2 dsumover | =head2 dsumover | |||
=for sig | =for sig | |||
Signature: (a(n); double [o]b()) | Signature: (a(n); double [o]b()) | |||
=for ref | =for ref | |||
Project via sum to N-1 dimensions | Project via sum to N-1 dimensions | |||
skipping to change at line 378 | skipping to change at line 378 | |||
Unlike L</sumover>, the calculations are performed in double precision. | Unlike L</sumover>, the calculations are performed in double precision. | |||
=for bad | =for bad | |||
dsumover processes bad values. | dsumover processes 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 474 "Ufunc.pm" | #line 474 "Ufunc.pm" | |||
#line 1060 "../../blib/lib/PDL/PP.pm" | #line 951 "../../blib/lib/PDL/PP.pm" | |||
*dsumover = \&PDL::dsumover; | *dsumover = \&PDL::dsumover; | |||
#line 481 "Ufunc.pm" | #line 481 "Ufunc.pm" | |||
#line 1058 "../../blib/lib/PDL/PP.pm" | #line 949 "../../blib/lib/PDL/PP.pm" | |||
=head2 cumusumover | =head2 cumusumover | |||
=for sig | =for sig | |||
Signature: (a(n); int+ [o]b(n)) | Signature: (a(n); int+ [o]b(n)) | |||
=for ref | =for ref | |||
Cumulative sum | Cumulative sum | |||
skipping to change at line 420 | skipping to change at line 420 | |||
$spectrum = cumusumover $image->transpose | $spectrum = cumusumover $image->transpose | |||
=for bad | =for bad | |||
cumusumover processes bad values. | cumusumover processes 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 528 "Ufunc.pm" | #line 528 "Ufunc.pm" | |||
#line 1060 "../../blib/lib/PDL/PP.pm" | #line 951 "../../blib/lib/PDL/PP.pm" | |||
*cumusumover = \&PDL::cumusumover; | *cumusumover = \&PDL::cumusumover; | |||
#line 535 "Ufunc.pm" | #line 535 "Ufunc.pm" | |||
#line 1058 "../../blib/lib/PDL/PP.pm" | #line 949 "../../blib/lib/PDL/PP.pm" | |||
=head2 dcumusumover | =head2 dcumusumover | |||
=for sig | =for sig | |||
Signature: (a(n); double [o]b(n)) | Signature: (a(n); double [o]b(n)) | |||
=for ref | =for ref | |||
Cumulative sum | Cumulative sum | |||
skipping to change at line 464 | skipping to change at line 464 | |||
Unlike L</cumusumover>, the calculations are performed in double precision. | Unlike L</cumusumover>, the calculations are performed in double precision. | |||
=for bad | =for bad | |||
dcumusumover processes bad values. | dcumusumover processes 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 582 "Ufunc.pm" | #line 582 "Ufunc.pm" | |||
#line 1060 "../../blib/lib/PDL/PP.pm" | #line 951 "../../blib/lib/PDL/PP.pm" | |||
*dcumusumover = \&PDL::dcumusumover; | *dcumusumover = \&PDL::dcumusumover; | |||
#line 589 "Ufunc.pm" | #line 589 "Ufunc.pm" | |||
#line 1058 "../../blib/lib/PDL/PP.pm" | #line 949 "../../blib/lib/PDL/PP.pm" | |||
=head2 andover | =head2 andover | |||
=for sig | =for sig | |||
Signature: (a(n); int+ [o]b()) | Signature: (a(n); int+ [o]b()) | |||
=for ref | =for ref | |||
Project via and to N-1 dimensions | Project via and to N-1 dimensions | |||
skipping to change at line 504 | skipping to change at line 504 | |||
=for bad | =for bad | |||
If C<a()> contains only bad data (and its bad flag is set), | If C<a()> contains only bad data (and its bad flag is set), | |||
C<b()> is set bad. Otherwise C<b()> will have its bad flag cleared, | C<b()> is set bad. Otherwise C<b()> will have its bad flag cleared, | |||
as it will not contain any bad values. | as it will not contain any bad values. | |||
=cut | =cut | |||
#line 633 "Ufunc.pm" | #line 633 "Ufunc.pm" | |||
#line 1060 "../../blib/lib/PDL/PP.pm" | #line 951 "../../blib/lib/PDL/PP.pm" | |||
*andover = \&PDL::andover; | *andover = \&PDL::andover; | |||
#line 640 "Ufunc.pm" | #line 640 "Ufunc.pm" | |||
#line 1058 "../../blib/lib/PDL/PP.pm" | #line 949 "../../blib/lib/PDL/PP.pm" | |||
=head2 bandover | =head2 bandover | |||
=for sig | =for sig | |||
Signature: (a(n); [o]b()) | Signature: (a(n); [o]b()) | |||
=for ref | =for ref | |||
Project via bitwise and to N-1 dimensions | Project via bitwise and to N-1 dimensions | |||
skipping to change at line 544 | skipping to change at line 544 | |||
=for bad | =for bad | |||
If C<a()> contains only bad data (and its bad flag is set), | If C<a()> contains only bad data (and its bad flag is set), | |||
C<b()> is set bad. Otherwise C<b()> will have its bad flag cleared, | C<b()> is set bad. Otherwise C<b()> will have its bad flag cleared, | |||
as it will not contain any bad values. | as it will not contain any bad values. | |||
=cut | =cut | |||
#line 684 "Ufunc.pm" | #line 684 "Ufunc.pm" | |||
#line 1060 "../../blib/lib/PDL/PP.pm" | #line 951 "../../blib/lib/PDL/PP.pm" | |||
*bandover = \&PDL::bandover; | *bandover = \&PDL::bandover; | |||
#line 691 "Ufunc.pm" | #line 691 "Ufunc.pm" | |||
#line 1058 "../../blib/lib/PDL/PP.pm" | #line 949 "../../blib/lib/PDL/PP.pm" | |||
=head2 borover | =head2 borover | |||
=for sig | =for sig | |||
Signature: (a(n); [o]b()) | Signature: (a(n); [o]b()) | |||
=for ref | =for ref | |||
Project via bitwise or to N-1 dimensions | Project via bitwise or to N-1 dimensions | |||
skipping to change at line 584 | skipping to change at line 584 | |||
=for bad | =for bad | |||
If C<a()> contains only bad data (and its bad flag is set), | If C<a()> contains only bad data (and its bad flag is set), | |||
C<b()> is set bad. Otherwise C<b()> will have its bad flag cleared, | C<b()> is set bad. Otherwise C<b()> will have its bad flag cleared, | |||
as it will not contain any bad values. | as it will not contain any bad values. | |||
=cut | =cut | |||
#line 735 "Ufunc.pm" | #line 735 "Ufunc.pm" | |||
#line 1060 "../../blib/lib/PDL/PP.pm" | #line 951 "../../blib/lib/PDL/PP.pm" | |||
*borover = \&PDL::borover; | *borover = \&PDL::borover; | |||
#line 742 "Ufunc.pm" | #line 742 "Ufunc.pm" | |||
#line 1058 "../../blib/lib/PDL/PP.pm" | #line 949 "../../blib/lib/PDL/PP.pm" | |||
=head2 orover | =head2 orover | |||
=for sig | =for sig | |||
Signature: (a(n); int+ [o]b()) | Signature: (a(n); int+ [o]b()) | |||
=for ref | =for ref | |||
Project via or to N-1 dimensions | Project via or to N-1 dimensions | |||
skipping to change at line 624 | skipping to change at line 624 | |||
=for bad | =for bad | |||
If C<a()> contains only bad data (and its bad flag is set), | If C<a()> contains only bad data (and its bad flag is set), | |||
C<b()> is set bad. Otherwise C<b()> will have its bad flag cleared, | C<b()> is set bad. Otherwise C<b()> will have its bad flag cleared, | |||
as it will not contain any bad values. | as it will not contain any bad values. | |||
=cut | =cut | |||
#line 786 "Ufunc.pm" | #line 786 "Ufunc.pm" | |||
#line 1060 "../../blib/lib/PDL/PP.pm" | #line 951 "../../blib/lib/PDL/PP.pm" | |||
*orover = \&PDL::orover; | *orover = \&PDL::orover; | |||
#line 793 "Ufunc.pm" | #line 793 "Ufunc.pm" | |||
#line 1058 "../../blib/lib/PDL/PP.pm" | #line 949 "../../blib/lib/PDL/PP.pm" | |||
=head2 zcover | =head2 zcover | |||
=for sig | =for sig | |||
Signature: (a(n); int+ [o]b()) | Signature: (a(n); int+ [o]b()) | |||
=for ref | =for ref | |||
Project via == 0 to N-1 dimensions | Project via == 0 to N-1 dimensions | |||
skipping to change at line 664 | skipping to change at line 664 | |||
=for bad | =for bad | |||
If C<a()> contains only bad data (and its bad flag is set), | If C<a()> contains only bad data (and its bad flag is set), | |||
C<b()> is set bad. Otherwise C<b()> will have its bad flag cleared, | C<b()> is set bad. Otherwise C<b()> will have its bad flag cleared, | |||
as it will not contain any bad values. | as it will not contain any bad values. | |||
=cut | =cut | |||
#line 837 "Ufunc.pm" | #line 837 "Ufunc.pm" | |||
#line 1060 "../../blib/lib/PDL/PP.pm" | #line 951 "../../blib/lib/PDL/PP.pm" | |||
*zcover = \&PDL::zcover; | *zcover = \&PDL::zcover; | |||
#line 844 "Ufunc.pm" | #line 844 "Ufunc.pm" | |||
#line 1058 "../../blib/lib/PDL/PP.pm" | #line 949 "../../blib/lib/PDL/PP.pm" | |||
=head2 intover | =head2 intover | |||
=for sig | =for sig | |||
Signature: (a(n); float+ [o]b()) | Signature: (a(n); float+ [o]b()) | |||
=for ref | =for ref | |||
Project via integral to N-1 dimensions | Project via integral to N-1 dimensions | |||
skipping to change at line 713 | skipping to change at line 713 | |||
is the natural (and correct) choice for binned data, of course. | is the natural (and correct) choice for binned data, of course. | |||
=for bad | =for bad | |||
intover ignores the bad-value flag of the input ndarrays. | intover ignores the bad-value flag 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. | 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 897 "Ufunc.pm" | #line 897 "Ufunc.pm" | |||
#line 1060 "../../blib/lib/PDL/PP.pm" | #line 951 "../../blib/lib/PDL/PP.pm" | |||
*intover = \&PDL::intover; | *intover = \&PDL::intover; | |||
#line 904 "Ufunc.pm" | #line 904 "Ufunc.pm" | |||
#line 1058 "../../blib/lib/PDL/PP.pm" | #line 949 "../../blib/lib/PDL/PP.pm" | |||
=head2 average | =head2 average | |||
=for sig | =for sig | |||
Signature: (a(n); int+ [o]b()) | Signature: (a(n); int+ [o]b()) | |||
=for ref | =for ref | |||
Project via average to N-1 dimensions | Project via average to N-1 dimensions | |||
skipping to change at line 752 | skipping to change at line 752 | |||
$spectrum = average $image->transpose | $spectrum = average $image->transpose | |||
=for bad | =for bad | |||
average processes bad values. | average processes 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 948 "Ufunc.pm" | #line 948 "Ufunc.pm" | |||
#line 1060 "../../blib/lib/PDL/PP.pm" | #line 951 "../../blib/lib/PDL/PP.pm" | |||
*average = \&PDL::average; | *average = \&PDL::average; | |||
#line 955 "Ufunc.pm" | #line 955 "Ufunc.pm" | |||
#line 304 "ufunc.pd" | #line 304 "ufunc.pd" | |||
=head2 avgover | =head2 avgover | |||
=for ref | =for ref | |||
Synonym for average. | Synonym for average. | |||
=cut | =cut | |||
*PDL::avgover = *avgover = \&PDL::average; | *PDL::avgover = *avgover = \&PDL::average; | |||
#line 970 "Ufunc.pm" | #line 970 "Ufunc.pm" | |||
#line 1058 "../../blib/lib/PDL/PP.pm" | #line 949 "../../blib/lib/PDL/PP.pm" | |||
=head2 caverage | =head2 caverage | |||
=for sig | =for sig | |||
Signature: (a(n); cdouble [o]b()) | Signature: (a(n); cdouble [o]b()) | |||
=for ref | =for ref | |||
Project via average to N-1 dimensions | Project via average to N-1 dimensions | |||
skipping to change at line 807 | skipping to change at line 807 | |||
precision. | precision. | |||
=for bad | =for bad | |||
caverage processes bad values. | caverage processes 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 1015 "Ufunc.pm" | #line 1015 "Ufunc.pm" | |||
#line 1060 "../../blib/lib/PDL/PP.pm" | #line 951 "../../blib/lib/PDL/PP.pm" | |||
*caverage = \&PDL::caverage; | *caverage = \&PDL::caverage; | |||
#line 1022 "Ufunc.pm" | #line 1022 "Ufunc.pm" | |||
#line 304 "ufunc.pd" | #line 304 "ufunc.pd" | |||
=head2 cavgover | =head2 cavgover | |||
=for ref | =for ref | |||
Synonym for caverage. | Synonym for caverage. | |||
=cut | =cut | |||
*PDL::cavgover = *cavgover = \&PDL::caverage; | *PDL::cavgover = *cavgover = \&PDL::caverage; | |||
#line 1037 "Ufunc.pm" | #line 1037 "Ufunc.pm" | |||
#line 1058 "../../blib/lib/PDL/PP.pm" | #line 949 "../../blib/lib/PDL/PP.pm" | |||
=head2 daverage | =head2 daverage | |||
=for sig | =for sig | |||
Signature: (a(n); double [o]b()) | Signature: (a(n); double [o]b()) | |||
=for ref | =for ref | |||
Project via average to N-1 dimensions | Project via average to N-1 dimensions | |||
skipping to change at line 862 | skipping to change at line 862 | |||
precision. | precision. | |||
=for bad | =for bad | |||
daverage processes bad values. | daverage processes 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 1082 "Ufunc.pm" | #line 1082 "Ufunc.pm" | |||
#line 1060 "../../blib/lib/PDL/PP.pm" | #line 951 "../../blib/lib/PDL/PP.pm" | |||
*daverage = \&PDL::daverage; | *daverage = \&PDL::daverage; | |||
#line 1089 "Ufunc.pm" | #line 1089 "Ufunc.pm" | |||
#line 304 "ufunc.pd" | #line 304 "ufunc.pd" | |||
=head2 davgover | =head2 davgover | |||
=for ref | =for ref | |||
Synonym for daverage. | Synonym for daverage. | |||
=cut | =cut | |||
*PDL::davgover = *davgover = \&PDL::daverage; | *PDL::davgover = *davgover = \&PDL::daverage; | |||
#line 1104 "Ufunc.pm" | #line 1104 "Ufunc.pm" | |||
#line 1058 "../../blib/lib/PDL/PP.pm" | #line 949 "../../blib/lib/PDL/PP.pm" | |||
=head2 minimum | =head2 minimum | |||
=for sig | =for sig | |||
Signature: (a(n); [o]c()) | Signature: (a(n); [o]c()) | |||
=for ref | =for ref | |||
Project via minimum to N-1 dimensions | Project via minimum to N-1 dimensions | |||
skipping to change at line 918 | skipping to change at line 918 | |||
Output is set bad if no elements of the input are non-bad, | Output is set bad if no elements of the input are non-bad, | |||
otherwise the bad flag is cleared for the output ndarray. | otherwise the bad flag is cleared for the output ndarray. | |||
Note that C<NaNs> are considered to be valid values and will "win" over non-C<Na N>; | Note that C<NaNs> are considered to be valid values and will "win" over non-C<Na N>; | |||
see L<isfinite|PDL::Math/isfinite> and L<badmask|PDL::Bad/badmask> | see L<isfinite|PDL::Math/isfinite> and L<badmask|PDL::Bad/badmask> | |||
for ways of masking NaNs. | for ways of masking NaNs. | |||
=cut | =cut | |||
#line 1152 "Ufunc.pm" | #line 1152 "Ufunc.pm" | |||
#line 1060 "../../blib/lib/PDL/PP.pm" | #line 951 "../../blib/lib/PDL/PP.pm" | |||
*minimum = \&PDL::minimum; | *minimum = \&PDL::minimum; | |||
#line 1159 "Ufunc.pm" | #line 1159 "Ufunc.pm" | |||
#line 304 "ufunc.pd" | #line 304 "ufunc.pd" | |||
=head2 minover | =head2 minover | |||
=for ref | =for ref | |||
Synonym for minimum. | Synonym for minimum. | |||
=cut | =cut | |||
*PDL::minover = *minover = \&PDL::minimum; | *PDL::minover = *minover = \&PDL::minimum; | |||
#line 1174 "Ufunc.pm" | #line 1174 "Ufunc.pm" | |||
#line 1058 "../../blib/lib/PDL/PP.pm" | #line 949 "../../blib/lib/PDL/PP.pm" | |||
=head2 minimum_ind | =head2 minimum_ind | |||
=for sig | =for sig | |||
Signature: (a(n); indx [o] c()) | Signature: (a(n); indx [o] c()) | |||
=for ref | =for ref | |||
Like minimum but returns the index rather than the value | Like minimum but returns the index rather than the value | |||
skipping to change at line 960 | skipping to change at line 960 | |||
Output is set bad if no elements of the input are non-bad, | Output is set bad if no elements of the input are non-bad, | |||
otherwise the bad flag is cleared for the output ndarray. | otherwise the bad flag is cleared for the output ndarray. | |||
Note that C<NaNs> are considered to be valid values and will "win" over non-C<Na N>; | Note that C<NaNs> are considered to be valid values and will "win" over non-C<Na N>; | |||
see L<isfinite|PDL::Math/isfinite> and L<badmask|PDL::Bad/badmask> | see L<isfinite|PDL::Math/isfinite> and L<badmask|PDL::Bad/badmask> | |||
for ways of masking NaNs. | for ways of masking NaNs. | |||
=cut | =cut | |||
#line 1203 "Ufunc.pm" | #line 1203 "Ufunc.pm" | |||
#line 1060 "../../blib/lib/PDL/PP.pm" | #line 951 "../../blib/lib/PDL/PP.pm" | |||
*minimum_ind = \&PDL::minimum_ind; | *minimum_ind = \&PDL::minimum_ind; | |||
#line 1210 "Ufunc.pm" | #line 1210 "Ufunc.pm" | |||
#line 304 "ufunc.pd" | #line 304 "ufunc.pd" | |||
=head2 minover_ind | =head2 minover_ind | |||
=for ref | =for ref | |||
Synonym for minimum_ind. | Synonym for minimum_ind. | |||
=cut | =cut | |||
*PDL::minover_ind = *minover_ind = \&PDL::minimum_ind; | *PDL::minover_ind = *minover_ind = \&PDL::minimum_ind; | |||
#line 1225 "Ufunc.pm" | #line 1225 "Ufunc.pm" | |||
#line 1058 "../../blib/lib/PDL/PP.pm" | #line 949 "../../blib/lib/PDL/PP.pm" | |||
=head2 minimum_n_ind | =head2 minimum_n_ind | |||
=for sig | =for sig | |||
Signature: (a(n); indx [o]c(m); PDL_Indx m_size => m) | Signature: (a(n); indx [o]c(m); PDL_Indx m_size => m) | |||
=for ref | =for ref | |||
Returns the index of C<m_size> minimum elements. As of 2.077, you can | Returns the index of C<m_size> minimum elements. As of 2.077, you can | |||
skipping to change at line 1011 | skipping to change at line 1011 | |||
Output bad flag is cleared for the output ndarray if sufficient non-bad elements found, | Output bad flag is cleared for the output ndarray if sufficient non-bad elements found, | |||
else remaining slots in C<$c()> are set bad. | else remaining slots in C<$c()> are set bad. | |||
Note that C<NaNs> are considered to be valid values and will "win" over non-C<Na N>; | Note that C<NaNs> are considered to be valid values and will "win" over non-C<Na N>; | |||
see L<isfinite|PDL::Math/isfinite> and L<badmask|PDL::Bad/badmask> | see L<isfinite|PDL::Math/isfinite> and L<badmask|PDL::Bad/badmask> | |||
for ways of masking NaNs. | for ways of masking NaNs. | |||
=cut | =cut | |||
#line 1265 "Ufunc.pm" | #line 1265 "Ufunc.pm" | |||
#line 1059 "../../blib/lib/PDL/PP.pm" | #line 950 "../../blib/lib/PDL/PP.pm" | |||
#line 409 "ufunc.pd" | #line 409 "ufunc.pd" | |||
sub PDL::minimum_n_ind { | sub PDL::minimum_n_ind { | |||
my ($a, $c, $m_size) = @_; | my ($a, $c, $m_size) = @_; | |||
$m_size //= ref($c) ? $c->dim(0) : $c; # back-compat with pre-2.077 | $m_size //= ref($c) ? $c->dim(0) : $c; # back-compat with pre-2.077 | |||
my $set_out = 1; | my $set_out = 1; | |||
$set_out = 0, $c = null if !ref $c; | $set_out = 0, $c = null if !ref $c; | |||
$c = $c->indx if !$c->isnull; | $c = $c->indx if !$c->isnull; | |||
PDL::_minimum_n_ind_int($a, $c, $m_size); | PDL::_minimum_n_ind_int($a, $c, $m_size); | |||
$set_out ? $_[1] = $c : $c; | $set_out ? $_[1] = $c : $c; | |||
} | } | |||
#line 1071 "../../blib/lib/PDL/PP.pm" | #line 962 "../../blib/lib/PDL/PP.pm" | |||
#line 1283 "Ufunc.pm" | #line 1283 "Ufunc.pm" | |||
#line 1060 "../../blib/lib/PDL/PP.pm" | #line 951 "../../blib/lib/PDL/PP.pm" | |||
*minimum_n_ind = \&PDL::minimum_n_ind; | *minimum_n_ind = \&PDL::minimum_n_ind; | |||
#line 1290 "Ufunc.pm" | #line 1290 "Ufunc.pm" | |||
#line 304 "ufunc.pd" | #line 304 "ufunc.pd" | |||
=head2 minover_n_ind | =head2 minover_n_ind | |||
=for ref | =for ref | |||
Synonym for minimum_n_ind. | Synonym for minimum_n_ind. | |||
=cut | =cut | |||
*PDL::minover_n_ind = *minover_n_ind = \&PDL::minimum_n_ind; | *PDL::minover_n_ind = *minover_n_ind = \&PDL::minimum_n_ind; | |||
#line 1305 "Ufunc.pm" | #line 1305 "Ufunc.pm" | |||
#line 1058 "../../blib/lib/PDL/PP.pm" | #line 949 "../../blib/lib/PDL/PP.pm" | |||
=head2 maximum | =head2 maximum | |||
=for sig | =for sig | |||
Signature: (a(n); [o]c()) | Signature: (a(n); [o]c()) | |||
=for ref | =for ref | |||
Project via maximum to N-1 dimensions | Project via maximum to N-1 dimensions | |||
skipping to change at line 1082 | skipping to change at line 1082 | |||
Output is set bad if no elements of the input are non-bad, | Output is set bad if no elements of the input are non-bad, | |||
otherwise the bad flag is cleared for the output ndarray. | otherwise the bad flag is cleared for the output ndarray. | |||
Note that C<NaNs> are considered to be valid values and will "win" over non-C<Na N>; | Note that C<NaNs> are considered to be valid values and will "win" over non-C<Na N>; | |||
see L<isfinite|PDL::Math/isfinite> and L<badmask|PDL::Bad/badmask> | see L<isfinite|PDL::Math/isfinite> and L<badmask|PDL::Bad/badmask> | |||
for ways of masking NaNs. | for ways of masking NaNs. | |||
=cut | =cut | |||
#line 1353 "Ufunc.pm" | #line 1353 "Ufunc.pm" | |||
#line 1060 "../../blib/lib/PDL/PP.pm" | #line 951 "../../blib/lib/PDL/PP.pm" | |||
*maximum = \&PDL::maximum; | *maximum = \&PDL::maximum; | |||
#line 1360 "Ufunc.pm" | #line 1360 "Ufunc.pm" | |||
#line 304 "ufunc.pd" | #line 304 "ufunc.pd" | |||
=head2 maxover | =head2 maxover | |||
=for ref | =for ref | |||
Synonym for maximum. | Synonym for maximum. | |||
=cut | =cut | |||
*PDL::maxover = *maxover = \&PDL::maximum; | *PDL::maxover = *maxover = \&PDL::maximum; | |||
#line 1375 "Ufunc.pm" | #line 1375 "Ufunc.pm" | |||
#line 1058 "../../blib/lib/PDL/PP.pm" | #line 949 "../../blib/lib/PDL/PP.pm" | |||
=head2 maximum_ind | =head2 maximum_ind | |||
=for sig | =for sig | |||
Signature: (a(n); indx [o] c()) | Signature: (a(n); indx [o] c()) | |||
=for ref | =for ref | |||
Like maximum but returns the index rather than the value | Like maximum but returns the index rather than the value | |||
skipping to change at line 1124 | skipping to change at line 1124 | |||
Output is set bad if no elements of the input are non-bad, | Output is set bad if no elements of the input are non-bad, | |||
otherwise the bad flag is cleared for the output ndarray. | otherwise the bad flag is cleared for the output ndarray. | |||
Note that C<NaNs> are considered to be valid values and will "win" over non-C<Na N>; | Note that C<NaNs> are considered to be valid values and will "win" over non-C<Na N>; | |||
see L<isfinite|PDL::Math/isfinite> and L<badmask|PDL::Bad/badmask> | see L<isfinite|PDL::Math/isfinite> and L<badmask|PDL::Bad/badmask> | |||
for ways of masking NaNs. | for ways of masking NaNs. | |||
=cut | =cut | |||
#line 1404 "Ufunc.pm" | #line 1404 "Ufunc.pm" | |||
#line 1060 "../../blib/lib/PDL/PP.pm" | #line 951 "../../blib/lib/PDL/PP.pm" | |||
*maximum_ind = \&PDL::maximum_ind; | *maximum_ind = \&PDL::maximum_ind; | |||
#line 1411 "Ufunc.pm" | #line 1411 "Ufunc.pm" | |||
#line 304 "ufunc.pd" | #line 304 "ufunc.pd" | |||
=head2 maxover_ind | =head2 maxover_ind | |||
=for ref | =for ref | |||
Synonym for maximum_ind. | Synonym for maximum_ind. | |||
=cut | =cut | |||
*PDL::maxover_ind = *maxover_ind = \&PDL::maximum_ind; | *PDL::maxover_ind = *maxover_ind = \&PDL::maximum_ind; | |||
#line 1426 "Ufunc.pm" | #line 1426 "Ufunc.pm" | |||
#line 1058 "../../blib/lib/PDL/PP.pm" | #line 949 "../../blib/lib/PDL/PP.pm" | |||
=head2 maximum_n_ind | =head2 maximum_n_ind | |||
=for sig | =for sig | |||
Signature: (a(n); indx [o]c(m); PDL_Indx m_size => m) | Signature: (a(n); indx [o]c(m); PDL_Indx m_size => m) | |||
=for ref | =for ref | |||
Returns the index of C<m_size> maximum elements. As of 2.077, you can | Returns the index of C<m_size> maximum elements. As of 2.077, you can | |||
skipping to change at line 1175 | skipping to change at line 1175 | |||
Output bad flag is cleared for the output ndarray if sufficient non-bad elements found, | Output bad flag is cleared for the output ndarray if sufficient non-bad elements found, | |||
else remaining slots in C<$c()> are set bad. | else remaining slots in C<$c()> are set bad. | |||
Note that C<NaNs> are considered to be valid values and will "win" over non-C<Na N>; | Note that C<NaNs> are considered to be valid values and will "win" over non-C<Na N>; | |||
see L<isfinite|PDL::Math/isfinite> and L<badmask|PDL::Bad/badmask> | see L<isfinite|PDL::Math/isfinite> and L<badmask|PDL::Bad/badmask> | |||
for ways of masking NaNs. | for ways of masking NaNs. | |||
=cut | =cut | |||
#line 1466 "Ufunc.pm" | #line 1466 "Ufunc.pm" | |||
#line 1059 "../../blib/lib/PDL/PP.pm" | #line 950 "../../blib/lib/PDL/PP.pm" | |||
#line 409 "ufunc.pd" | #line 409 "ufunc.pd" | |||
sub PDL::maximum_n_ind { | sub PDL::maximum_n_ind { | |||
my ($a, $c, $m_size) = @_; | my ($a, $c, $m_size) = @_; | |||
$m_size //= ref($c) ? $c->dim(0) : $c; # back-compat with pre-2.077 | $m_size //= ref($c) ? $c->dim(0) : $c; # back-compat with pre-2.077 | |||
my $set_out = 1; | my $set_out = 1; | |||
$set_out = 0, $c = null if !ref $c; | $set_out = 0, $c = null if !ref $c; | |||
$c = $c->indx if !$c->isnull; | $c = $c->indx if !$c->isnull; | |||
PDL::_maximum_n_ind_int($a, $c, $m_size); | PDL::_maximum_n_ind_int($a, $c, $m_size); | |||
$set_out ? $_[1] = $c : $c; | $set_out ? $_[1] = $c : $c; | |||
} | } | |||
#line 1071 "../../blib/lib/PDL/PP.pm" | #line 962 "../../blib/lib/PDL/PP.pm" | |||
#line 1484 "Ufunc.pm" | #line 1484 "Ufunc.pm" | |||
#line 1060 "../../blib/lib/PDL/PP.pm" | #line 951 "../../blib/lib/PDL/PP.pm" | |||
*maximum_n_ind = \&PDL::maximum_n_ind; | *maximum_n_ind = \&PDL::maximum_n_ind; | |||
#line 1491 "Ufunc.pm" | #line 1491 "Ufunc.pm" | |||
#line 304 "ufunc.pd" | #line 304 "ufunc.pd" | |||
=head2 maxover_n_ind | =head2 maxover_n_ind | |||
=for ref | =for ref | |||
Synonym for maximum_n_ind. | Synonym for maximum_n_ind. | |||
=cut | =cut | |||
*PDL::maxover_n_ind = *maxover_n_ind = \&PDL::maximum_n_ind; | *PDL::maxover_n_ind = *maxover_n_ind = \&PDL::maximum_n_ind; | |||
#line 1506 "Ufunc.pm" | #line 1506 "Ufunc.pm" | |||
#line 1058 "../../blib/lib/PDL/PP.pm" | #line 949 "../../blib/lib/PDL/PP.pm" | |||
=head2 minmaximum | =head2 minmaximum | |||
=for sig | =for sig | |||
Signature: (a(n); [o]cmin(); [o] cmax(); indx [o]cmin_ind(); indx [o]cmax_ind( )) | Signature: (a(n); [o]cmin(); [o] cmax(); indx [o]cmin_ind(); indx [o]cmax_ind( )) | |||
=for ref | =for ref | |||
Find minimum and maximum and their indices for a given ndarray; | Find minimum and maximum and their indices for a given ndarray; | |||
skipping to change at line 1239 | skipping to change at line 1239 | |||
=for bad | =for bad | |||
If C<a()> contains only bad data, then the output ndarrays will | If C<a()> contains only bad data, then the output ndarrays will | |||
be set bad, along with their bad flag. | be set bad, along with their bad flag. | |||
Otherwise they will have their bad flags cleared, | Otherwise they will have their bad flags cleared, | |||
since they will not contain any bad values. | since they will not contain any bad values. | |||
=cut | =cut | |||
#line 1544 "Ufunc.pm" | #line 1544 "Ufunc.pm" | |||
#line 1060 "../../blib/lib/PDL/PP.pm" | #line 951 "../../blib/lib/PDL/PP.pm" | |||
*minmaximum = \&PDL::minmaximum; | *minmaximum = \&PDL::minmaximum; | |||
#line 1551 "Ufunc.pm" | #line 1551 "Ufunc.pm" | |||
#line 304 "ufunc.pd" | #line 304 "ufunc.pd" | |||
=head2 minmaxover | =head2 minmaxover | |||
=for ref | =for ref | |||
skipping to change at line 1784 | skipping to change at line 1784 | |||
=cut | =cut | |||
*minmax = \&PDL::minmax; | *minmax = \&PDL::minmax; | |||
sub PDL::minmax { | sub PDL::minmax { | |||
my ($x)=@_; my $tmp; | my ($x)=@_; my $tmp; | |||
my @arr = $x->clump(-1)->minmaximum; | my @arr = $x->clump(-1)->minmaximum; | |||
map $_->sclr, @arr[0,1]; # as scalars ! | map $_->sclr, @arr[0,1]; # as scalars ! | |||
} | } | |||
#line 2128 "Ufunc.pm" | #line 2128 "Ufunc.pm" | |||
#line 1058 "../../blib/lib/PDL/PP.pm" | #line 949 "../../blib/lib/PDL/PP.pm" | |||
=head2 medover | =head2 medover | |||
=for sig | =for sig | |||
Signature: (a(n); [o]b(); [t]tmp(n)) | Signature: (a(n); [o]b(); [t]tmp(n)) | |||
=for ref | =for ref | |||
Project via median to N-1 dimensions | Project via median to N-1 dimensions | |||
skipping to change at line 1818 | skipping to change at line 1818 | |||
$spectrum = medover $image->transpose | $spectrum = medover $image->transpose | |||
=for bad | =for bad | |||
medover processes bad values. | medover processes 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 2172 "Ufunc.pm" | #line 2172 "Ufunc.pm" | |||
#line 1060 "../../blib/lib/PDL/PP.pm" | #line 951 "../../blib/lib/PDL/PP.pm" | |||
*medover = \&PDL::medover; | *medover = \&PDL::medover; | |||
#line 2179 "Ufunc.pm" | #line 2179 "Ufunc.pm" | |||
#line 1058 "../../blib/lib/PDL/PP.pm" | #line 949 "../../blib/lib/PDL/PP.pm" | |||
=head2 oddmedover | =head2 oddmedover | |||
=for sig | =for sig | |||
Signature: (a(n); [o]b(); [t]tmp(n)) | Signature: (a(n); [o]b(); [t]tmp(n)) | |||
=for ref | =for ref | |||
Project via oddmedian to N-1 dimensions | Project via oddmedian to N-1 dimensions | |||
skipping to change at line 1864 | skipping to change at line 1864 | |||
some circumstances. | some circumstances. | |||
=for bad | =for bad | |||
oddmedover processes bad values. | oddmedover processes 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 2231 "Ufunc.pm" | #line 2231 "Ufunc.pm" | |||
#line 1060 "../../blib/lib/PDL/PP.pm" | #line 951 "../../blib/lib/PDL/PP.pm" | |||
*oddmedover = \&PDL::oddmedover; | *oddmedover = \&PDL::oddmedover; | |||
#line 2238 "Ufunc.pm" | #line 2238 "Ufunc.pm" | |||
#line 1058 "../../blib/lib/PDL/PP.pm" | #line 949 "../../blib/lib/PDL/PP.pm" | |||
=head2 modeover | =head2 modeover | |||
=for sig | =for sig | |||
Signature: (data(n); [o]out(); [t]sorted(n)) | Signature: (data(n); [o]out(); [t]sorted(n)) | |||
=for ref | =for ref | |||
Project via mode to N-1 dimensions | Project via mode to N-1 dimensions | |||
skipping to change at line 1913 | skipping to change at line 1913 | |||
BAD is the most common element, the returned value is also BAD. | BAD is the most common element, the returned value is also BAD. | |||
=for bad | =for bad | |||
modeover does not process bad values. | modeover 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 2292 "Ufunc.pm" | #line 2292 "Ufunc.pm" | |||
#line 1060 "../../blib/lib/PDL/PP.pm" | #line 951 "../../blib/lib/PDL/PP.pm" | |||
*modeover = \&PDL::modeover; | *modeover = \&PDL::modeover; | |||
#line 2299 "Ufunc.pm" | #line 2299 "Ufunc.pm" | |||
#line 1058 "../../blib/lib/PDL/PP.pm" | #line 949 "../../blib/lib/PDL/PP.pm" | |||
=head2 pctover | =head2 pctover | |||
=for sig | =for sig | |||
Signature: (a(n); p(); [o]b(); [t]tmp(n)) | Signature: (a(n); p(); [o]b(); [t]tmp(n)) | |||
=for ref | =for ref | |||
Project via specified percentile to N-1 dimensions | Project via specified percentile to N-1 dimensions | |||
skipping to change at line 1960 | skipping to change at line 1960 | |||
and recommended by NIST. | and recommended by NIST. | |||
=for bad | =for bad | |||
pctover processes bad values. | pctover processes 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 2350 "Ufunc.pm" | #line 2350 "Ufunc.pm" | |||
#line 1060 "../../blib/lib/PDL/PP.pm" | #line 951 "../../blib/lib/PDL/PP.pm" | |||
*pctover = \&PDL::pctover; | *pctover = \&PDL::pctover; | |||
#line 2357 "Ufunc.pm" | #line 2357 "Ufunc.pm" | |||
#line 1058 "../../blib/lib/PDL/PP.pm" | #line 949 "../../blib/lib/PDL/PP.pm" | |||
=head2 oddpctover | =head2 oddpctover | |||
=for sig | =for sig | |||
Signature: (a(n); p(); [o]b(); [t]tmp(n)) | Signature: (a(n); p(); [o]b(); [t]tmp(n)) | |||
=for ref | =for ref | |||
Project via specified percentile to N-1 dimensions | Project via specified percentile to N-1 dimensions | |||
skipping to change at line 2005 | skipping to change at line 2005 | |||
first at L<http://en.wikipedia.org/wiki/Percentile>. | first at L<http://en.wikipedia.org/wiki/Percentile>. | |||
=for bad | =for bad | |||
oddpctover processes bad values. | oddpctover processes 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 2406 "Ufunc.pm" | #line 2406 "Ufunc.pm" | |||
#line 1060 "../../blib/lib/PDL/PP.pm" | #line 951 "../../blib/lib/PDL/PP.pm" | |||
*oddpctover = \&PDL::oddpctover; | *oddpctover = \&PDL::oddpctover; | |||
#line 2413 "Ufunc.pm" | #line 2413 "Ufunc.pm" | |||
#line 934 "ufunc.pd" | #line 934 "ufunc.pd" | |||
=head2 pct | =head2 pct | |||
=for ref | =for ref | |||
skipping to change at line 2058 | skipping to change at line 2058 | |||
=cut | =cut | |||
*oddpct = \&PDL::oddpct; | *oddpct = \&PDL::oddpct; | |||
sub PDL::oddpct { | sub PDL::oddpct { | |||
my($x, $p) = @_; | my($x, $p) = @_; | |||
$x->clump(-1)->oddpctover($p, my $tmp=PDL->nullcreate($x)); | $x->clump(-1)->oddpctover($p, my $tmp=PDL->nullcreate($x)); | |||
$tmp; | $tmp; | |||
} | } | |||
#line 2465 "Ufunc.pm" | #line 2465 "Ufunc.pm" | |||
#line 1058 "../../blib/lib/PDL/PP.pm" | #line 949 "../../blib/lib/PDL/PP.pm" | |||
=head2 qsort | =head2 qsort | |||
=for sig | =for sig | |||
Signature: (a(n); [o]b(n)) | Signature: (a(n); [o]b(n)) | |||
=for ref | =for ref | |||
Quicksort a vector into ascending order. | Quicksort a vector into ascending order. | |||
skipping to change at line 2086 | skipping to change at line 2086 | |||
Bad values are moved to the end of the array: | Bad values are moved to the end of the array: | |||
pdl> p $y | pdl> p $y | |||
[42 47 98 BAD 22 96 74 41 79 76 96 BAD 32 76 25 59 BAD 96 32 BAD] | [42 47 98 BAD 22 96 74 41 79 76 96 BAD 32 76 25 59 BAD 96 32 BAD] | |||
pdl> p qsort($y) | pdl> p qsort($y) | |||
[22 25 32 32 41 42 47 59 74 76 76 79 96 96 96 98 BAD BAD BAD BAD] | [22 25 32 32 41 42 47 59 74 76 76 79 96 96 96 98 BAD BAD BAD BAD] | |||
=cut | =cut | |||
#line 2501 "Ufunc.pm" | #line 2501 "Ufunc.pm" | |||
#line 1060 "../../blib/lib/PDL/PP.pm" | #line 951 "../../blib/lib/PDL/PP.pm" | |||
*qsort = \&PDL::qsort; | *qsort = \&PDL::qsort; | |||
#line 2508 "Ufunc.pm" | #line 2508 "Ufunc.pm" | |||
#line 1058 "../../blib/lib/PDL/PP.pm" | #line 949 "../../blib/lib/PDL/PP.pm" | |||
=head2 qsorti | =head2 qsorti | |||
=for sig | =for sig | |||
Signature: (a(n); indx [o]indx(n)) | Signature: (a(n); indx [o]indx(n)) | |||
=for ref | =for ref | |||
Quicksort a vector and return index of elements in ascending order. | Quicksort a vector and return index of elements in ascending order. | |||
skipping to change at line 2120 | skipping to change at line 2120 | |||
Bad elements are moved to the end of the array: | Bad elements are moved to the end of the array: | |||
pdl> p $y | pdl> p $y | |||
[42 47 98 BAD 22 96 74 41 79 76 96 BAD 32 76 25 59 BAD 96 32 BAD] | [42 47 98 BAD 22 96 74 41 79 76 96 BAD 32 76 25 59 BAD 96 32 BAD] | |||
pdl> p $y->index( qsorti($y) ) | pdl> p $y->index( qsorti($y) ) | |||
[22 25 32 32 41 42 47 59 74 76 76 79 96 96 96 98 BAD BAD BAD BAD] | [22 25 32 32 41 42 47 59 74 76 76 79 96 96 96 98 BAD BAD BAD BAD] | |||
=cut | =cut | |||
#line 2545 "Ufunc.pm" | #line 2545 "Ufunc.pm" | |||
#line 1060 "../../blib/lib/PDL/PP.pm" | #line 951 "../../blib/lib/PDL/PP.pm" | |||
*qsorti = \&PDL::qsorti; | *qsorti = \&PDL::qsorti; | |||
#line 2552 "Ufunc.pm" | #line 2552 "Ufunc.pm" | |||
#line 1058 "../../blib/lib/PDL/PP.pm" | #line 949 "../../blib/lib/PDL/PP.pm" | |||
=head2 qsortvec | =head2 qsortvec | |||
=for sig | =for sig | |||
Signature: (a(n,m); [o]b(n,m)) | Signature: (a(n,m); [o]b(n,m)) | |||
=for ref | =for ref | |||
Sort a list of vectors lexicographically. | Sort a list of vectors lexicographically. | |||
skipping to change at line 2168 | skipping to change at line 2168 | |||
[ | [ | |||
[-100 0] | [-100 0] | |||
[ 0 0] | [ 0 0] | |||
[ 100 0] | [ 100 0] | |||
[ BAD 0] | [ BAD 0] | |||
] | ] | |||
=cut | =cut | |||
#line 2603 "Ufunc.pm" | #line 2603 "Ufunc.pm" | |||
#line 1060 "../../blib/lib/PDL/PP.pm" | #line 951 "../../blib/lib/PDL/PP.pm" | |||
*qsortvec = \&PDL::qsortvec; | *qsortvec = \&PDL::qsortvec; | |||
#line 2610 "Ufunc.pm" | #line 2610 "Ufunc.pm" | |||
#line 1058 "../../blib/lib/PDL/PP.pm" | #line 949 "../../blib/lib/PDL/PP.pm" | |||
=head2 qsortveci | =head2 qsortveci | |||
=for sig | =for sig | |||
Signature: (a(n,m); indx [o]indx(m)) | Signature: (a(n,m); indx [o]indx(m)) | |||
=for ref | =for ref | |||
Sort a list of vectors lexicographically, returning the indices of the | Sort a list of vectors lexicographically, returning the indices of the | |||
skipping to change at line 2204 | skipping to change at line 2204 | |||
so qsortveci may be thought of as a collapse operator of sorts (groan). | so qsortveci may be thought of as a collapse operator of sorts (groan). | |||
=for bad | =for bad | |||
Vectors with bad components are moved to the end of the array as | Vectors with bad components are moved to the end of the array as | |||
for L</qsortvec>. | for L</qsortvec>. | |||
=cut | =cut | |||
#line 2649 "Ufunc.pm" | #line 2649 "Ufunc.pm" | |||
#line 1060 "../../blib/lib/PDL/PP.pm" | #line 951 "../../blib/lib/PDL/PP.pm" | |||
*qsortveci = \&PDL::qsortveci; | *qsortveci = \&PDL::qsortveci; | |||
#line 2656 "Ufunc.pm" | #line 2656 "Ufunc.pm" | |||
#line 1182 "ufunc.pd" | #line 1182 "ufunc.pd" | |||
=head1 AUTHOR | =head1 AUTHOR | |||
Copyright (C) Tuomas J. Lukka 1997 (lukka@husc.harvard.edu). | Copyright (C) Tuomas J. Lukka 1997 (lukka@husc.harvard.edu). | |||
Contributions by Christian Soeller (c.soeller@auckland.ac.nz) | Contributions by Christian Soeller (c.soeller@auckland.ac.nz) | |||
End of changes. 74 change blocks. | ||||
74 lines changed or deleted | 74 lines changed or added |