From b4a8509d3a8c57c6121ac9cbd8719f7e3010f7a1 Mon Sep 17 00:00:00 2001 From: Michael Kraus Date: Thu, 21 Nov 2024 14:24:08 +0100 Subject: [PATCH] Fix _pode_samples. --- src/harmonic_oscillator.jl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/harmonic_oscillator.jl b/src/harmonic_oscillator.jl index 783b1e2..0713ad1 100644 --- a/src/harmonic_oscillator.jl +++ b/src/harmonic_oscillator.jl @@ -109,9 +109,12 @@ module HarmonicOscillator qsamples = vec(collect.(collect(Base.Iterators.product(qs...)))) psamples = vec(collect.(collect(Base.Iterators.product(ps...)))) - samples = vec(collect(Base.Iterators.product(qsamples, psamples))) + zsamples = Base.Iterators.product(qsamples, psamples) - (q = qsamples, p = psamples) + return ( + q = vec([zs[1] for zs in zsamples]), + p = vec([zs[2] for zs in zsamples]), + ) end