You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Wire plot=True on compute functions to render via nns.plotting
Previously the compute functions accepted R-compatible plot arguments and
immediately `del`'d them, so `plot=True` produced nothing — a strict validator
expecting a figure would fail. Now `plot=True` renders a Matplotlib figure as a
side effect through the nns.plotting layer while the value-only return contract
(which the parity suite depends on) is unchanged.
Wired:
- nns_reg: plot / plot_regions -> plot_nns_reg; residual_plot -> residual scatter
- nns_m_reg: plot -> fitted-vs-actual; residual_plot -> residual scatter
- nns_arma / nns_arma_optim -> plot_nns_arma / plot_nns_arma_optim
- nns_cdf (univariate) -> plot_nns_cdf
- nns_seas -> plot_nns_seas (compute split into _nns_seas_compute)
Rendering only fires for results that carry the needed series, and default
plot=False opens no figure (verified). Adds tests/plotting/test_compute_plot_flag.py
asserting plot=True creates a figure and returns the same value as plot=False.
Updates the plot-parity policy and README.
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -142,7 +142,7 @@ Important boundaries:
142
142
- Stochastic exact stream parity is not expected because Python paths use NumPy random generation.
143
143
- Factor and class ordering should be passed explicitly when ordering matters.
144
144
- Direct raw-factor `nns_m_reg(..., factor_2_dummy=True)` is intentionally guarded. Use `prepare_factor_predictors(...)` before `nns_m_reg(...)`.
145
-
- Compute functions' `plot` arguments are ignored and data is returned instead; visual plotting is a separate API in `nns.plotting`, color/element-faithful to R but not pixel-diffed.
145
+
- Compute functions still return values, not figures; passing `plot=True` (where R has it) additionally renders a Matplotlib figure as a side effect via the `nns.plotting` layer, which is color/element-faithful to R but not pixel-diffed. The plot functions can also be called directly on a computed result.
146
146
147
147
See [behavior conventions](docs/conventions.md) for detailed compatibility notes.
0 commit comments