[Python][C++] Update type definition of npy_traits for Float16 to arrow::util::Float16 instead of uint16_t

Open Beginner friendly
#46,701 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
78/100
Issue type
Refactor
Clarity
Clearly specified
Activity status
Quiet
Tech stack
cpp, python
Domain
data

Research direction

Start with python/pyarrow/src/arrow/python/type_traits.h around lines 88-90 and read the linked discussion in pull request 46618 for the rationale. Update the Float16 npy_traits type definition to use arrow::util::Float16, then verify the affected Python/C++ build or checks pass.

Written by the indexing model from the issue text.

Description

Component: C++ Component: Python Status: needs champion Type: enhancement
Describe the enhancement requested

As suggested on the following comment:
https://github.com/apache/arrow/pull/46618#discussion_r2112073163

The type definition of npy_traits for Float16 could be arrow::util::Float16 instead of uint16_t, making it semantically clearer.

https://github.com/apache/arrow/blob/55628cd5fed83187d65b8860c3edfc70e09f9a57/python/pyarrow/src/arrow/python/type_traits.h#L88-L90

Component(s)

C++, Python

Dominant language
C++
Stars
17.1k
Forks
4.3k
Avg merge
3d 13h
Merged PRs (30d)
93

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/arrow

All issues in apache/arrow

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.