From 3916ce5d4d08134bb4bfbe37418df29d0b963fea Mon Sep 17 00:00:00 2001 From: jordandouglas Date: Tue, 6 Aug 2024 11:41:23 +1200 Subject: [PATCH] update parameter dimension on -resume #fixes 1159 --- src/beast/base/inference/parameter/Parameter.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/beast/base/inference/parameter/Parameter.java b/src/beast/base/inference/parameter/Parameter.java index 5b1efdff..cdf10181 100644 --- a/src/beast/base/inference/parameter/Parameter.java +++ b/src/beast/base/inference/parameter/Parameter.java @@ -6,6 +6,7 @@ import beast.base.core.Description; import beast.base.core.Function; import beast.base.core.Input; +import beast.base.core.Log; import beast.base.inference.StateNode; import java.io.PrintStream; @@ -513,7 +514,8 @@ public void assignFrom(final StateNode other) { @Override public void assignFromFragile(final StateNode other) { @SuppressWarnings("unchecked") final Parameter.Base source = (Parameter.Base) other; - System.arraycopy(source.values, 0, values, 0, Math.min(values.length, source.getDimension())); + this.setDimension(source.values.length); + System.arraycopy(source.values, 0, values, 0, source.values.length); Arrays.fill(m_bIsDirty, false); }