Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#114 zeroes and ones => recursively called from derived classes

closed-fixed
nobody
None
5
2006-03-16
2005-04-04
Anonymous
No

in a perldl shell:

$a = cplx random(2,3,3);
$a->ones # or $a->zeroes

ones call method ones

May be...
sub ones { ref($_[0]) && ref($_[0]) ne 'PDL::Type' ?
PDL::ones($_[0]) : PDL->ones(@_) }

Original:

sub ones { ref($_[0]) && ref($_[0]) ne 'PDL::Type' ?
$_[0]->ones : PDL->ones(@_) }

Discussion

  • Logged In: NO

    I use this:
    sub zeroes { UNIVERSAL::isa($_[0], 'PDL') ?
    PDL::zeroes($_[0]) : PDL->zeroes(@_) }

    Here new_from_specification is used (same class is obtained)

     
  • Logged In: NO

    About a possible new release:
    This suggestion concerns Core.pm.
    Moreover, I think it's a critical bug

    Cheers

     
  • Craig DeForest
    Craig DeForest
    2006-03-16

    Logged In: YES
    user_id=20200

    Bug fixed in CVS.
    Thanks for reporting the problem!

     
  • Craig DeForest
    Craig DeForest
    2006-03-16

    • status: open --> closed
     
  • Craig DeForest
    Craig DeForest
    2006-03-16

    • status: closed --> closed-fixed