numpy / numpy/numpy

ENH: Add a `bit_width` function

Open
#28,441 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

01 - Enhancement
Dominant language
Python
Stars
32.8k
Forks
12.8k
Avg merge
1d 7h
Merged PRs (30d)
197

Description

Proposed new feature or change:

Mailing list post

Feature request: Add a bit_width function to NumPy's bit-wise operations that computes the bit-width (also called bit-length) of an input.

For an example, see C++'s bit_width function.

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.

Research direction

Read the linked mailing-list discussion and NumPy's bit-wise operations documentation first to understand the intended bit-width semantics and API placement. Compare the proposal with C++'s bit_width reference, then identify the relevant NumPy implementation and tests; done means the function is exposed in the bit-wise API and its behavior is covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.