Skip to content

Add more vendored NumPy tests#115

Open
ndgrigorian wants to merge 4 commits intomasterfrom
add-more-tests-for-interfaces
Open

Add more vendored NumPy tests#115
ndgrigorian wants to merge 4 commits intomasterfrom
add-more-tests-for-interfaces

Conversation

@ndgrigorian
Copy link
Copy Markdown
Collaborator

@ndgrigorian ndgrigorian commented Apr 9, 2026

This PR proposes adding more tests vendored from NumPy's random/tests. These tests are specifically vendored from tests for regressions in RandomState

The tests exposed some issues in multinomial, permutation, and randint, which were solved in the scope of this PR

@ndgrigorian ndgrigorian force-pushed the add-more-tests-for-interfaces branch from 757c278 to d317543 Compare April 9, 2026 06:43
@antonwolfy antonwolfy added this to the 1.4.0 release milestone Apr 9, 2026
assert_equal(out.shape, tgtShape)


class TestRegression:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Would it be better to move them into test_regression.py to keep file alignment with NumPy?
Probably it would be easier to maintain later when we need to refresh them with the latest NumPy changes.

Comment on lines 2210 to 2211
if size is None and dtype in (bool, int):
return dtype(ret)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Do we need to update that block also?
Is that expected?

np.int32 in (int, bool)
# Out: False

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