From: W. Trevor King Date: Tue, 17 Jul 2012 03:01:18 +0000 (-0400) Subject: Preliminary support for dependent formula waves. X-Git-Tag: v0.2~43 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2c97e5ad3f287a4e4b1600968f83886de34cfaf1;p=igor.git Preliminary support for dependent formula waves. --- diff --git a/igor/binarywave.py b/igor/binarywave.py index 7953ff1..856c85f 100644 --- a/igor/binarywave.py +++ b/igor/binarywave.py @@ -530,14 +530,16 @@ def loadibw(filename, strict=True): shape = [n for n in wave_info['nDim'] if n > 0] or (0,) else: shape = (wave_info['npnts'],) + t = numpy.dtype(numpy.int8) # setup a safe default if wave_info['type'] == 0: # text wave shape = (waveDataSize,) - t = numpy.dtype(numpy.int8) - else: + elif wave_info['type'] in TYPE_TABLE or wave_info['npnts']: t = numpy.dtype(TYPE_TABLE[wave_info['type']]) assert waveDataSize == wave_info['npnts'] * t.itemsize, ( '{}, {}, {}, {}'.format( waveDataSize, wave_info['npnts'], t.itemsize, t)) + else: + pass # formula waves if wave_info['npnts'] == 0: data_b = buffer('') else: