Skip to content

WASM: document platform-dependent intp overflow boundary (#929) - #952

Open
kp992 wants to merge 1 commit into
QuantEcon:mainfrom
kp992:wasm-929-intp-docs
Open

kp992 wants to merge 1 commit into
QuantEcon:mainfrom
kp992:wasm-929-intp-docs

Conversation

@kp992

@kp992 kp992 commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Closes #929.

Documents the np.iinfo(np.intp).max overflow boundary in comb_jit, num_compositions_jit, simplex_grid, and k_array_rank_jit, noting it is 2³¹−1 on wasm32 (JupyterLite) vs 2⁶³−1 on 64-bit platforms. No code changes.

Grep sweep of all intp/int_ sites in the library confirms every use is an index or array size — none need widening to int64.

@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 90.847%. remained the same — kp992:wasm-929-intp-docs into QuantEcon:main

@kp992

kp992 commented Sep 10, 2026

Copy link
Copy Markdown
Contributor Author
Screenshot 2026-09-09 at 6 33 58 PM

Verified this on https://notebook.link/@anutosh491/numba-ecosystem.

On my local machine:

% python 
Python 3.11.9 | packaged by conda-forge | (main, Apr 19 2024, 18:34:54) [Clang 16.0.6 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy as np
>>> np.iinfo(np.intp).max, 2**63-1
(9223372036854775807, 9223372036854775807)

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.

WASM: audit 32-bit intp behaviour on wasm32 (overflow guards, simplex_index wrapping, dtypes)

2 participants