Subject: | Perl -> Python type bug after some data operations |
Sometimes Inline::Python seems to be interpretting an array of floating
point values as an array of integers. I have not yet looked at the
Inline::Python code, but I have attached a small test case that
demonstrates the behavior.
Subject: | inline-float-bug.pl |
use Inline Python => <<END;
def pyprint(*args):
print args
END
my @a = (0.1,0.2,0.3,0.4);
pyprint \@a; # Correct output
map($a[$_]+$a[$_], 0..$#a);
pyprint \@a; # Incorrect output (all zeros)
@a = map($_*1.0, @a);
pyprint \@a; # Correct output