This would obviously benefit enormously from loop fusion or making your own custom PDL operation.$inds = $x->whichND($x == 0); $x->indexND($inds) .= ($x->random < 0.5)->indexND($inds); $x->inplace->clip(0,1);
In reply to Re: PDL, applying function
by etj
in thread PDL, applying function
by rootcho
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |