Skip to content

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

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

gh-146238: support half-floats in the array module#146242
vstinner merged 6 commits intopython:mainfrom
skirpichev:support-halffloat-arrays/146238

Conversation

@skirpichev
Copy link
Copy Markdown
Member

@skirpichev skirpichev commented Mar 21, 2026

@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
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
Copy link
Copy Markdown
Member

@vstinner vstinner left a comment

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.

@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.

@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
53 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)
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.

2 participants