From 2c97e5ad3f287a4e4b1600968f83886de34cfaf1 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Mon, 16 Jul 2012 23:01:18 -0400 Subject: [PATCH] Preliminary support for dependent formula waves. --- igor/binarywave.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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: -- 2.26.2