Skip to content

Closes #4569: Simplify and extend logic in doBigIntBinOpvv and doBigIntBinOpvvBoolReturn - #4593

Merged
ajpotts merged 1 commit into
Bears-R-Us:mainfrom
1RyanK:4569-Simplify_and_extend_logic_in_doBigIntBinOpvv_and_doBigIntBinOpvvBoolReturn
Nov 21, 2025
Merged

ajpotts merged 1 commit into
Bears-R-Us:mainfrom
1RyanK:4569-Simplify_and_extend_logic_in_doBigIntBinOpvv_and_doBigIntBinOpvvBoolReturn

Conversation

@1RyanK

@1RyanK 1RyanK commented Jun 12, 2025

Copy link
Copy Markdown
Contributor

Added operations that should work between bigints and reals, straightened out the code significantly and also added support for a few other operations between types that wasn't previously supported.

Closes #4569: Simplify and extend logic in doBigIntBinOpvv and doBigIntBinOpvvBoolReturn

@1RyanK
1RyanK force-pushed the 4569-Simplify_and_extend_logic_in_doBigIntBinOpvv_and_doBigIntBinOpvvBoolReturn branch 8 times, most recently from ee9eaed to 7a87f79 Compare June 18, 2025 17:09
@1RyanK
1RyanK force-pushed the 4569-Simplify_and_extend_logic_in_doBigIntBinOpvv_and_doBigIntBinOpvvBoolReturn branch from 7a87f79 to 1417f39 Compare June 30, 2025 11:37
@1RyanK
1RyanK changed the base branch from master to main August 1, 2025 17:00
@1RyanK
1RyanK force-pushed the 4569-Simplify_and_extend_logic_in_doBigIntBinOpvv_and_doBigIntBinOpvvBoolReturn branch from bfe5aac to ce0e7d9 Compare August 1, 2025 17:20
Comment thread arkouda/numpy/pdarraycreation.py Resolved
@drculhane

Copy link
Copy Markdown
Contributor

I'm getting an error in the boolean return. I think I've done this correctly. Take a look. The first element of b < c should be True.

>>> b
array([4 5 6 7])
>>> b.dtype
dtype(bigint)
>>> c
array([4.5 4.5 4.5 4.5])
>>> c.dtype
dtype('float64')
>>> b < c
array([False False False False])
>>> b > c
array([False True True True])

@1RyanK
1RyanK force-pushed the 4569-Simplify_and_extend_logic_in_doBigIntBinOpvv_and_doBigIntBinOpvvBoolReturn branch 3 times, most recently from 8a4737c to 046d338 Compare August 29, 2025 17:53
@1RyanK
1RyanK marked this pull request as ready for review August 29, 2025 17:53
@1RyanK
1RyanK force-pushed the 4569-Simplify_and_extend_logic_in_doBigIntBinOpvv_and_doBigIntBinOpvvBoolReturn branch from 046d338 to e1b2014 Compare September 2, 2025 12:16
Comment thread tests/operator_test.py Resolved
Comment thread tests/operator_test.py Resolved
Comment thread src/BinOp.chpl Resolved
@1RyanK
1RyanK force-pushed the 4569-Simplify_and_extend_logic_in_doBigIntBinOpvv_and_doBigIntBinOpvvBoolReturn branch from 2d18a64 to 3794550 Compare October 3, 2025 11:48
github-merge-queue Bot pushed a commit that referenced this pull request Oct 17, 2025
I mainly was trying to fix issues surrounding things like
`ak.array([-2**200])`, but while I was messing around in `ak.array` I
noticed a few other things that needed fixing.

This is needed for #4593.

**Summary of Changes**

* Added an early `str` check to raise a clear `TypeError` for scalar
string inputs.
* Tightened iterable handling to convert only generators/ranges to
lists, leaving `np.ndarray` and `pd.Series` intact.
* Refined unsigned integer inference to require non-negative values and
include values ≥ 2⁶³.
* Added automatic `bigint` inference for `object` arrays containing only
integers.
* Reworked negative bigint handling to properly construct signed bigints
using a sign mask.
* Added tests for large negative bigint values, range conversion,
unsigned inference, and mixed-sign behavior.

**Purpose:**
Fixes incorrect bigint conversion for large negative numbers and cleans
up input normalization and dtype inference logic.


Closes #4984: ak.array with negative numbers still has problems
@1RyanK
1RyanK force-pushed the 4569-Simplify_and_extend_logic_in_doBigIntBinOpvv_and_doBigIntBinOpvvBoolReturn branch 2 times, most recently from 171ce27 to 317a1d9 Compare November 13, 2025 17:33
@1RyanK
1RyanK force-pushed the 4569-Simplify_and_extend_logic_in_doBigIntBinOpvv_and_doBigIntBinOpvvBoolReturn branch from 17acd25 to 7bd5cba Compare November 14, 2025 15:36
@1RyanK
1RyanK force-pushed the 4569-Simplify_and_extend_logic_in_doBigIntBinOpvv_and_doBigIntBinOpvvBoolReturn branch from 7bd5cba to 1ead109 Compare November 14, 2025 15:38

@drculhane drculhane left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Very nice work.

Comment thread src/OperatorMsg.chpl Resolved
@ajpotts
ajpotts added this pull request to the merge queue Nov 21, 2025
Merged via the queue into Bears-R-Us:main with commit 0637622 Nov 21, 2025
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.

Simplify and extend logic in doBigIntBinOpvv and doBigIntBinOpvvBoolReturn

3 participants