Skip to content

gh-146238: support half-floats in the array module - #146242

Merged
vstinner merged 6 commits into
python:mainfrom
skirpichev:support-halffloat-arrays/146238
Mar 30, 2026
Merged

vstinner merged 6 commits into
python:mainfrom
skirpichev:support-halffloat-arrays/146238

Conversation

@skirpichev

@skirpichev skirpichev commented Mar 21, 2026 •

Copy link
Copy Markdown
Member
@skirpichev

This comment was marked as resolved.

@skirpichev
skirpichev force-pushed the support-halffloat-arrays/146238 branch from ac5646a to 2bac9b5 Compare March 26, 2026 19:46
@skirpichev
skirpichev marked this pull request as ready for review March 26, 2026 23:05
@hugovk
hugovk removed their request for review March 27, 2026 11:34
Comment thread Doc/library/array.rst Resolved
Comment thread Doc/whatsnew/3.15.rst Resolved
Comment thread Doc/whatsnew/3.15.rst Resolved
skirpichev and others added 2 commits March 28, 2026 03:28
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
@skirpichev
skirpichev requested a review from vstinner March 30, 2026 10:10

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I have a minor suggestion on the test.

Comment thread Lib/test/test_array.py Resolved
@vstinner
vstinner enabled auto-merge (squash) March 30, 2026 11:27
@vstinner

Copy link
Copy Markdown
Member

Hum. It seems like the CI is stuck :-(

    All required checks passExpected — Waiting for status to be reported
    DO-NOT-MERGEExpected — Waiting for status to be reported
    Unresolved reviewExpected — Waiting for status to be reported

I clicked on [Update branch] to try to unblock the CI.

@vstinner

Copy link
Copy Markdown
Member

There are test failures. Example on Windows x64: https://github.com/python/cpython/actions/runs/23743340664/job/69165604606?pr=146242


FAIL: test_cmp (test.test_array.HalfFloatTest.test_cmp)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\a\cpython\cpython\Lib\test\test_array.py", line 624, in test_cmp
    self.assertIs(a < ab, True)
    ~~~~~~~~~~~~~^^^^^^^^^^^^^^
AssertionError: False is not True
@skirpichev

Copy link
Copy Markdown
Member Author

There are test failures.

e8bb6f3 is the problem: biggerexample[-2] now is smaller than example[-2] for 'e' type.

Comment thread Lib/test/test_array.py Resolved
@vstinner

Copy link
Copy Markdown
Member

e8bb6f3 is the problem: biggerexample[-2] now is smaller than example[-2] for 'e' type.

Ooops. I fixed test_array in the following commit.

@vstinner

Copy link
Copy Markdown
Member

I modified example, smallerexample and biggerexample values of HalfFloatTest to use values closer to FPTest.

@vstinner
vstinner merged commit e79fd60 into python:main Mar 30, 2026
49 checks passed
@vstinner

Copy link
Copy Markdown
Member

Merged, thanks for your contribution.

@skirpichev
skirpichev deleted the support-halffloat-arrays/146238 branch March 30, 2026 22:41
maurycy added a commit to maurycy/cpython that referenced this pull request Mar 31, 2026
* main:
  pythongh-145458: use `self.skip_idle` consistently in the tachyon profiler (python#145459)
  pythongh-146615: Fix format specifiers in Objects/ directory (pythonGH-146620)
  pythongh-146615: Fix format specifiers in Python/ directory (pythonGH-146619)
  pythongh-146615: Fix format specifiers in test cextensions (pythonGH-146618)
  pythongh-146615: Fix format specifiers in extension modules (pythonGH-146617)
  pythongh-146615: Fix crash in __get__() for METH_METHOD descriptors with invalid type argument (pythonGH-146634)
  pythongh-146376: Reduce timeout in Emscripten GHA workflow (python#146378)
  pythongh-146442: Fix various bugs in compiler pipeline (python#146443)
  pythongh-146238: Support half-floats in the array module (python#146242)
  pythongh-145056: Add support for merging collections.UserDict and frozendict (pythonGH-146465)
  pythongh-145056: Fix merging of collections.OrderedDict and frozendict (pythonGH-146466)
  pythongh-139633: Run netrc file permission check only once per parse (pythonGH-139634)
clin1234 pushed a commit to clin1234/cpython that referenced this pull request Apr 16, 2026
Co-authored-by: Victor Stinner <vstinner@python.org>
ljfp pushed a commit to ljfp/cpython that referenced this pull request Apr 25, 2026
Co-authored-by: Victor Stinner <vstinner@python.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants