From eeb1eade49c685a862cb8f65046efa62711d6f92 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Wed, 10 Nov 2010 12:56:07 -0500 Subject: [PATCH] Add yaml load test to hooke.curve.Data. --- hooke/curve.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hooke/curve.py b/hooke/curve.py index a4819cf..4e1b6ca 100644 --- a/hooke/curve.py +++ b/hooke/curve.py @@ -92,10 +92,14 @@ class Data (numpy.ndarray): The data-type is also YAMLable (see :mod:`hooke.util.yaml`). >>> import yaml - >>> print yaml.dump(d) + >>> s = yaml.dump(d) + >>> print s !hooke.curve.DataInfo columns: [distance (m), force (N)] + >>> z = yaml.load(s) + >>> z + Data([], shape=(0, 0), dtype=float32) """ def __new__(subtype, shape, dtype=numpy.float, buffer=None, offset=0, strides=None, order=None, info=None): -- 2.26.2