Skip to content

Update randint_untyped to reuse randint implementation - #176

Open
vlad-perevezentsev wants to merge 4 commits into
fix-scalar-full-range-brngfrom
update_randint_untyped
Open

vlad-perevezentsev wants to merge 4 commits into
fix-scalar-full-range-brngfrom
update_randint_untyped

Conversation

@vlad-perevezentsev

Copy link
Copy Markdown
Collaborator

This PR updates the randint_untyped implementation to reuse randint, adding

  • support for array_like (broadcastable) low/high bounds
  • support for bounds outside the C long range, which used to raise OverflowError for e.g. randint_untyped(0, 2**40) on Windows
  • shared validation so bad bounds report the same errors as randint

The generated values and the int32/int64 result type selection are unchanged.

It also removes irk_discrete_uniform_vec and irk_discrete_uniform_long_vec, left without callers by the change above.

@ndgrigorian ndgrigorian left a comment

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.

For the changes only in this PR, this LGTM

@antonwolfy antonwolfy added this to the 1.6.0 release milestone Sep 25, 2026

This branch has not been deployed

No deployments
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.

3 participants