Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
TST: PR 31332 revisions
* Parametrize `test_gh_31308()` to include an `"i, i"` style
structured dtype construction. That test case currently fails
so will need to be repaired to avoid overflow.

[skip azp] [skip cirrus] [skip actions]
  • Loading branch information
tylerjereddy committed Apr 29, 2026
commit 997f0c4b0f27e852144dbc5de3220b4cee92d6e2
9 changes: 6 additions & 3 deletions numpy/_core/tests/test_dtype.py
Original file line number Diff line number Diff line change
Expand Up @@ -2048,10 +2048,13 @@ def test_signature_dtypes_classes(self, typename: str):
assert params_actual == params_expect


def test_gh_31308():
kind = [("x", np.float64, 2 ** 28)]
@pytest.mark.parametrize("kind, exp", [
([("x", np.float64, 2 ** 28)], (2 ** 28 * 8)),
("2147483648i,2147483648i", 17179869184),
])
def test_gh_31308(kind, exp):
kind_dtype = np.dtype(kind)
Comment thread
tylerjereddy marked this conversation as resolved.
assert kind_dtype.itemsize == (2 ** 28) * 8
assert kind_dtype.itemsize == exp


@pytest.mark.skipif(not IS_64BIT, reason="test requires 64-bit system")
Expand Down