#10 PDL Has no signed 8-bit integer datatype

open
nobody
None
5
2012-04-03
2008-06-15
Chris Marshall
No

This is a track ticket for rt.cpan.org #35666
The following is cut and paste from that report
at http://rt.cpan.org/Ticket/Display.html?id=35666

This bug should affect all platforms. I'm trying to improve on
PDL::IO::HDF5, and HDF5 has both signed and unsigned byte (I8/U8) types.
However, PDL only has unsigned byte types. Any PDLs created from HDF5 files
(and potentially other data sources) will be incorrect if they are signed
8-bit integers.

Suggest an extra PDL type of PDL_SB to go along with PDL_B (so as not to
break existing code... though it _should_ be PDL_UB and PDL_B).

I'm using PDL v2.4.3, Perl 5.8.8 (on MSWin32 if it matters)

I'm the original submitter... sorry. I finally found my PAUSE account. ;)

Also suggest the following full list of datatypes (* means need to add):

PDL_B *
PDL_UB *
PDL_S
PDL_US
PDL_L
PDL_UL *
PDL_LL
PDL_ULL *
PDL_F
PDL_D

The bigger question is do we do the datatypes consistently, and have
PDL_B and PDL_UB (which breaks older progams), or maintain backwards
compatibility and use PDL_B and PDL_SB?

-Richard

Discussion

  • Craig DeForest
    Craig DeForest
    2008-07-09

    Logged In: YES
    user_id=20200
    Originator: NO

    Interesting. This is definitely one to put in 2.5 as it involves a deep change in the PP engine -- but I suggest going with C-like 'char' nomenclature: PDL_C and PDL_UC; that way PDL_B can be retained as a legacy synonym for PDL_UC.

     
  • Chris Marshall
    Chris Marshall
    2008-10-19

    Moved this to low priority for PDL-2.4.4 and keeping the ticket open as a placeholder for PDL-2.5 development.

     
  • Chris Marshall
    Chris Marshall
    2008-10-19

    • priority: 5 --> 1
     
  • Chris Marshall
    Chris Marshall
    2011-07-16

    This is actually a feature request...

     
  • Chris Marshall
    Chris Marshall
    2011-07-16

    • labels: 101696 -->
    • milestone: 100443 -->
     
  • Chris Marshall
    Chris Marshall
    2012-04-03

    • priority: 1 --> 5
     
  • Chris Marshall
    Chris Marshall
    2012-04-03

    With the update to 64bit support, I think it would be appropriate
    to roll in the addition of char data types as well.

    @zowie: to what deep change in the PP engine were you referring?