
Everything both npe() and nle() do before touching a density estimator
Source: R/npe.R
prepare_simulations.RdGet the simulations (running the simulator or taking pre-computed ones),
coerce them to matrices, drop non-finite draws, and learn the two
standardizers. Shared so the two entry points cannot drift apart – they
differ only in which side of (theta, x) the estimator treats as its target.