numpy availability strategy: bundle, side-venv, or scientific package variant #337
Labels
No labels
Alpha Release Requirement
Bugfix
Demo Target
Documentation
Major Feature
Minor Feature
priority:tier1-active
priority:tier2-foundation
priority:tier3-future
priority:tier4-deferred
Refactoring & Cleanup
system:animation
system:documentation
system:grid
system:input
system:performance
system:procgen
system:python-binding
system:rendering
system:ui-hierarchy
Tiny Feature
workflow:blocked
workflow:needs-benchmark
workflow:needs-documentation
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
john/McRogueFace#337
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
From the 2026-07-02 memory-model review. The buffer-protocol issues (#334, #335) make mcrfpy numpy-ready; this issue decides how users actually get numpy.
Current state
__lib/Python/Lib/site-packages/contains just a README;__lib/Python/lib.linux-x86_64-3.14/has no_multiarray_umath.src/scripts/mcrf_venv.py:146-233already pip-installs into a separate venv and wires it up -- numpy is literally in its example strings.Options
package-*-scientificpreset: full stdlib + numpy, keeping light/full unchanged. Fits the existingtools/stdlib_modules.yamlpackaging structure.pip install numpytrivially work, but is its own large project.WASM: numpy-in-pyodide is a separate project, explicitly out of scope here.
Recommendation to evaluate first: (1) now + (3) when #334/#335 land, so 'McRogueFace for agents/RL' (#55, #154, #156) is a one-download story.
Note: python-tcod's ecosystem is numpy-native; matching that convention makes McRogueFace legible to the existing roguelike-dev community.
Refinement (2026-07-11): unblocked, bumped to tier2, framed as agent-env enabler
Unblocked. The buffer-protocol prerequisite shipped 2026-07-11: #334 (DiscreteMap buffer protocol) and #335 (ColorLayer/TileLayer zero-copy numpy views via
with layer.edit() as view:). mcrfpy is now buffer-protocol-ready; this issue is the only thing standing between that and users actually consuming the views with real numpy. Bumped tier3 → tier2.Why it matters now (destination). This is enabling background work for the agent environment: #54 (Jupyter), #55 (Wumpus sim), and #154/#156 (multi-agent LLM testbed). VLM/RL perception pipelines and Jupyter users expect numpy-native arrays, and matching python-tcod's numpy-native convention makes the environment legible to the existing roguelike-dev community.
New task — numpy round-trip validation. The sprint validated the buffer views through
memoryviewonly (numpy isn't in the build). Before we claim "numpy-ready," add a test/demo under the side-venv (src/scripts/mcrf_venv.py) provingnp.asarray/np.frombufferround-trips (a) aColorLayer.edit()view and (b) aDiscreteMap— write through numpy, read back the mutation in-engine.Delivery recommendation (reaffirmed). (1) Document the side-venv as the supported path now + (3) a
package-*-scientificpreset later. Keep numpy out of the core package — reinforced by the free-threading coupling: a bundled numpy must ship cp314t wheels if 3.14t ever lands (#336), doubling the interpreter matrix. #70 (mcrfpy as wheels against system Python) is the eventual cleanest delivery and makespip install numpytrivial.