Custom Query (132 matches)
Results (28 - 30 of 132)
|#32||fixed||patch to make libyaml compile in visual studio||xi||roel _ dot _ vanhout _ at _ gmail _ dot _ com|
|#73||invalid||numpy arrays ...||xi||lal.george@…|
What is the best way to transfer very large numpy arrays using PyYAML?
Ideally I would like to do something like:
However, the yaml.load returns an exception:
Since I have quoted the string, yaml should not be diving into it - correct?
|#54||fixed||load() fails to load consecutive documents||xi||cems at lanl dot gov|
Description: if a file contains multiple documents, yaml.load() fails to work after the first document is read.
I have a text file called test.yml that looks like this: --- as: "333 775260" --- zz: "top"
the following code works as expected:
f = open("test.xml") x = yaml.load_all(f) [ i for i in x]
that loads both documents. it does it lazily using a generator x.
The following does NOT work as exepcted: f = open("test.xml") yaml.load(f) yaml.load(f)
the first yaml.load(f) works and loads the first document. the second one fails. From the documentation I beleive yaml.load should consecutively load the next document upon each invocation on the stream. The error message upon failing to load varies depending upon what is in the second document. In the case shown here is the stack trace from ipython2.5
In : f = open("test4.yml")
In : yaml.load(f)
<type 'exceptions.AttributeError?'> Traceback (most recent call last)
/Users/cems/Documents/Collaboration/brettin/poisson_estimates/ace_to_yaml/<ipython console> in <module>()
/sw/lib/python2.5/site-packages/yaml/init.py in load(stream, Loader)
---> 66 return loader.get_data()
/sw/lib/python2.5/site-packages/yaml/constructor.py in get_data(self)
---> 38 return self.construct_document(self.get_node())
/sw/lib/python2.5/site-packages/yaml/composer.py in get_node(self)
---> 23 return self.compose_document()
/sw/lib/python2.5/site-packages/yaml/composer.py in compose_document(self)
---> 35 node = self.compose_node(None, None)
/sw/lib/python2.5/site-packages/yaml/composer.py in compose_node(self, parent, index)
---> 52 anchor = event.anchor