numpy / numpy/numpy-quaddtype

segfault: `QuadPrecision(1).byteswap()`

Open
#13 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
24
Forks
6
Avg merge
5d 41m
Merged PRs (30d)
3

Description

It seems to happen every time:

❯ python -m IPython
Python 3.13.9 (main, Oct 14 2025, 21:29:44) [Clang 20.1.4 ]
Type 'copyright', 'credits' or 'license' for more information
IPython 9.6.0 -- An enhanced Interactive Python. Type '?' for help.
Tip: You can use LaTeX or Unicode completion, `\alpha<tab>` will insert the α symbol.
Ctrl click to launch VS Code Native REPL

In [1]: import numpy_quaddtype as npq

In [2]: npq.QuadPrecision(1).byteswap()
[1]    1076585 segmentation fault (core dumped)  python -m IPython

For the numpy floating types this byteswap() is a no-op, I believe.

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

Reproduce the crash with Python 3.13.9 using QuadPrecision(1).byteswap() and compare it with NumPy floating types' byteswap behavior. Trace the QuadPrecision.byteswap() entry point and add a regression test showing that the call no longer segfaults and has the intended no-op behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
numpy, python
Domain
data
Issue type
Bug
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.