From c427ede41c4db84d1f6cff07e11fe5f01206999d Mon Sep 17 00:00:00 2001 From: anugrahjo Date: Sun, 24 Nov 2024 23:16:42 -0800 Subject: [PATCH] Fix docstrings causing doctest failures. --- pyslsqp/save_and_load.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyslsqp/save_and_load.py b/pyslsqp/save_and_load.py index 2d093cf..842588f 100644 --- a/pyslsqp/save_and_load.py +++ b/pyslsqp/save_and_load.py @@ -187,8 +187,8 @@ def load_variables(filepath, vars, itr_start=0, itr_end=-1, major_only=False): Summary saved to : slsqp_summary.out Iteration data saved to : slsqp_recorder.hdf5 >>> from pyslsqp.postprocessing import load_variables - >>> load_variables('slsqp_recorder.hdf5', ['objective', 'optimality', 'x[0]'], itr_start=0, itr_end=-1, major_only=True) - {'objective': [np.float64(0.5), np.float64(0.0), np.float64(0.0)], 'optimality': [np.float64(99.0), np.float64(0.0), np.float64(0.0)], 'x[0]': [np.float64(0.5), np.float64(0.0), np.float64(0.0)]} + >>> load_variables('slsqp_recorder.hdf5', ['objective', 'optimality', 'x[0]'], itr_start=0, itr_end=-1, major_only=True) # doctest: +ELLIPSIS + {'objective': [...0.5..., ...0.0..., ...0.0...], 'optimality': [...99.0..., ...0.0..., ...0.0...], 'x[0]': [...0.5..., ...0.0..., ...0.0...]} ''' if not isinstance(filepath, str): raise ValueError("filepath must be a string.")