Module array
source code
While the ligolw module provides classes and parser support for
reading and writing LIGO Light Weight XML documents, this module
supplements that code with classes and parsers that add intelligence to
the in-RAM document representation.
In particular, the document tree associated with an Array element is
enhanced. During parsing, the Stream element in this module converts the
character data contained within it into the elements of a numpy array
object. The array has the appropriate dimensions and type. When the
document is written out again, the Stream element serializes the array
back into character data.
The array is stored as an attribute of the Array element.
Version:
git id 8cbd1b7187ce3ed9a825d6ed11cc432f3cfde9a5
Date:
2017-12-05 15:29:36 +0000
Author:
Kipp Cannon <kipp.cannon@ligo.org>
|
Array
High-level Array element.
|
|
ArrayStream
High-level Stream element for use inside Arrays.
|
|
|
|
use_in(ContentHandler)
Modify ContentHandler, a sub-class of
glue.ligolw.LIGOLWContentHandler, to cause it to use the Array and
ArrayStream classes defined in this module when parsing XML
documents. |
source code
|
|
|
__package__ = ' glue.ligolw '
|
Scan xmldoc for an array named name. Raises ValueError if not exactly
1 such array is found.
|
Modify ContentHandler, a sub-class of
glue.ligolw.LIGOLWContentHandler, to cause it to use the Array and
ArrayStream classes defined in this module when parsing XML
documents.
Example:
>>> from glue.ligolw import ligolw
>>> class MyContentHandler(ligolw.LIGOLWContentHandler):
... pass
...
>>> use_in(MyContentHandler)
<class 'glue.ligolw.array.MyContentHandler'>
|