in reply to Re: PDL datatype
in thread PDL datatype
So if you type the number in straight its no problem, but if you read it from a file using rcols, or if you define a piddle and then put the number into the pre-existing piddle, then it truncates the number! I wonder why it does this?[njs@localhost Shu_Hardness_Ratios]$ perldl perlDL shell v1.33 PDL comes with ABSOLUTELY NO WARRANTY. For details, see the file 'COPYING' in the PDL distribution. This is free software and you are welcome to redistribute it under certain conditions, see the same file for details. ReadLines, NiceSlice, MultiLines enabled Reading PDL/default.perldlrc... Found docs database /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thre +ad-multi/PDL/pdldoc.db Type 'help' for online help Type 'demo' for online demos Loaded PDL v2.4.3 Note: AutoLoader not enabled ('use PDL::AutoLoader' recommended) perldl> $x=50137.685706 perldl> print $x 50137.685706 perldl> $x=pdl(50137.685706) perldl> print $x 50137.685706 perldl> $x=zeroes(1) perldl> use PDL::NiceSlice perldl> $x(0) .= 50137.685706 perldl> print $x [ 50137.686] perldl> $x = rcols "bursts.txt" Reading data into piddles of type: [ Double ] Read in 33 elements. perldl> print $x [ 50093.199 50094.308 50954.953 51767.383 51958.219 52005.696 52 +005.763 52142.188 52422.043 52459.414 52482.509 52693.953 52752 +.918 52836.803 52837.198 53107.974 53125.429 53141.53 53198.49 +5 53243.578 53489.381 53603.709 53661.37 53724.982 53724.983 +53864.724 53882.002 53969.248 54224.674 54225.636 54304.474 543 +04.539 54366.513]
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: PDL datatype
by etj (Priest) on Jun 07, 2022 at 03:45 UTC | |
|
Re^3: PDL datatype
by moklevat (Priest) on Nov 29, 2007 at 21:12 UTC | |
by etj (Priest) on Jun 07, 2022 at 04:14 UTC | |
by nickschurch (Acolyte) on Dec 03, 2007 at 01:59 UTC |