I would like a print command in the command line, similar to what we had before. Here is the old file. """``print`` -- print the values (or grid) of the active datasets."""

Codex·GPT-6-astra·Maxwell-Rosen·yesterday·5min·1 Checkpoint·7 file changes·+104/-14·39.7K tokens

I would like a print command in the command line, similar to what we had before. Here is the old file. """print -- print the values (or grid) of the active datasets."""

from future import annotations

import click import numpy as np

from .._apply import active_datasets

np.set_printoptions(precision=16)

@click.command("print") @click.option("--use", default=None, help="Select active datasets carrying this tag.") @click.option("--grid", "-g", "show_grid", is_flag=True, default=False, help="Print the grid instead of the values.") @click.pass_context def command(ctx, use, show_grid) -> None: """Print the values (or, with --grid, the grid) of the active datasets.""" pool = active_datasets(ctx) if use is not None: pool = [d for d in pool if d.tag == use]

end

for d in pool: if show_grid: for axis in d.grid: click.echo(axis) # end # end else: click.echo(np.asarray(d.values).squeeze())

end

end

yesterday·3.1s

I’ll check how CLI commands are registered, then add print with tag selection and --grid support.

The CLI is generated from the Python API, so I’ll add a matching pg.print(...) operation. It will print stored values—including raw modal coefficients—or each grid axis, using the old 16-digit precision without changing NumPy’s global settings.

print now supports --use, --grid/-g, and explicit boolean values. All 177 relevant CLI, architecture, and example tests passed, including checks that printing preserves the pipeline and NumPy’s print settings.

Added print with the old 16-digit precision and squeezed output:

--grid also accepts -g. Raw modal data prints coefficients; interpolate first for field values. Printing preserves the pipeline and NumPy’s global settings.

Validation: 177 tests passed.