Skip to content

Instantly share code, notes, and snippets.

@zpmorgan
Created August 3, 2012 05:33
Show Gist options
  • Save zpmorgan/3244720 to your computer and use it in GitHub Desktop.
Save zpmorgan/3244720 to your computer and use it in GitHub Desktop.
pdl fail regarding inplace assignment & lazy evaluation?
#!/usr/bin/env perl
use warnings;
use strict;
use PDL;
my $a = ones(2,2);
$a->inplace->minus($a*2,0);
print $a;
my $b = ones(2,2);
$b -= $b * 2;
print $b;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment