Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#307 make qsort[vec] inplace aware

feature_request
closed
nobody
other (94)
5
2012-07-03
2012-07-03
Tim
No

I recently had cause to sort a piddle inplace, but it looks like PDL::Ufunc::qsort is not inplace aware.

use strict;
use warnings;
use PDL;
my $pdl = sequence(10)->rotate(1);
print $pdl, "\n";
$pdl->inplace->qsort;
print $pdl,"\n";

I added Inplace=>1 to the pp_def for qsort and qsortvec, and tests for each.

Diff against latest repository is attached.

Many thanks.

- Tim

PDL 2.4.11, Perl 5.14.2, Ubuntu 12.04 kernel 3.2.0-26 x86_64

Discussion

  • Tim
    Tim
    2012-07-03

    git diff to make qsort[vec] inplace aware

     
  • Chris Marshall
    Chris Marshall
    2012-07-03

    • status: open --> closed
     
  • Chris Marshall
    Chris Marshall
    2012-07-03

    Bug fixed in Git.
    Thanks for reporting the problem!

     
  • Chris Marshall
    Chris Marshall
    2012-07-03

    Thanks again, Tim.