Skip to content

[bugfix] Compatibility with NumPy >=2.5 - #190

Open
DrYak wants to merge 1 commit into
alimanfoo:masterfrom
DrYak:fix_numpy25
Open

[bugfix] Compatibility with NumPy >=2.5#190
DrYak wants to merge 1 commit into
alimanfoo:masterfrom
DrYak:fix_numpy25

Conversation

@DrYak

@DrYak DrYak commented Jul 31, 2026

Copy link
Copy Markdown
  • Recent Numpy version only allow specifying array-protocol data type for nul-terminated bytes using S
  • the a alias as used in pysamstat is not valid anymore

This caused my software to crash with:

  File "…/lib/python3.12/site-packages/pysamstats/pileup.py", line 140, in load_pileup
    return util.load_stats(statfun, user_dtype=dtype, default_dtype=default_dtype,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "…/lib/python3.12/site-packages/pysamstats/util.py", line 67, in load_stats
    a = np.fromiter(it, dtype=dtype)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This patch changes the specifer to S

- Recent Numpy version only allow specifying array-protocol data type
  for nul-terminated bytes using `S`
- the `a` alias as used in pysamstat is not valid anymore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant