from_lal_type#
- gwpy.utils.lal.from_lal_type(laltype: type) type[source]#
Convert the data type of a LAL instance or type into a numpy data type.
- Parameters:
- laltype
SwigPyObjectortype The input LAL instance or type.
- laltype
- Returns:
- npytype
type The numpy data type, such as
numpy.uint32,numpy.float64, etc.
- npytype
- Raises:
ValueErrorIf the numpy data type cannot be inferred from the LAL object.
Examples
>>> from_lal_type(lal.REAL8TimeSeries) numpy.float64
This also works with instances of LAL series types:
>>> series = lal.CreateINT4TimeSeries("test", 0, 0, 1, "m", 10) >>> from_lal_type(series) numpy.int32