Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-1678

[Python] Incorrect serialization of numpy.float16

    XMLWordPrintableJSON

Details

    Description

      The issue can be reproduced as follows.

      import pyarrow as pa
      import numpy as np
      
      t = np.float16(-1.1)
      
      print(type(t), t) # <class 'numpy.float16'> -1.0996
      p = pa.serialize(t)
      
      t_new = pa.deserialize(p.to_buffer())
      
      print(type(t_new), t_new) #  <class 'int'> 0
      

      Attachments

        Issue Links

          Activity

            People

              Licht-T Licht Takeuchi
              Licht-T Licht Takeuchi
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: