##// END OF EJS Templates
HDFWriter Fixed
rflores -
r1710:906133bef78e
parent child
Show More
@@ -390,9 +390,9 class HDFWriter(Operation):
390 dsDict['nDim'] = 0
390 dsDict['nDim'] = 0
391 else:
391 else:
392 if uniqueChannel: #Creates extra dimension to avoid the creation of multiple channels
392 if uniqueChannel: #Creates extra dimension to avoid the creation of multiple channels
393 #dataAux = numpy.expand_dims(dataAux, axis=0)
393 dataAux = numpy.expand_dims(dataAux, axis=0)
394 setattr(self.dataOut, self.dataList[i], numpy.expand_dims(getattr(self.dataOut, self.dataList[i]), axis=0))
394 #setattr(self.dataOut, self.dataList[i], numpy.expand_dims(getattr(self.dataOut, self.dataList[i]), axis=0))
395 dataAux = getattr(self.dataOut, self.dataList[i])
395 #dataAux = getattr(self.dataOut, self.dataList[i])
396 #print(getattr(self.dataOut, self.dataList[i]))
396 #print(getattr(self.dataOut, self.dataList[i]))
397 dsDict['nDim'] = len(dataAux.shape)
397 dsDict['nDim'] = len(dataAux.shape)
398 dsDict['shape'] = dataAux.shape
398 dsDict['shape'] = dataAux.shape
@@ -581,6 +581,8 class HDFWriter(Operation):
581 sgrp = grp.create_group(label)
581 sgrp = grp.create_group(label)
582 else:
582 else:
583 sgrp = grp
583 sgrp = grp
584 if self.uniqueChannel: #Creates extra dimension to avoid the creation of multiple channels
585 setattr(self.dataOut, dsInfo['variable'], numpy.expand_dims(getattr(self.dataOut, dsInfo['variable']), axis=0))
584 for i in range(dsInfo['dsNumber']):
586 for i in range(dsInfo['dsNumber']):
585 ds = sgrp.create_dataset(
587 ds = sgrp.create_dataset(
586 self.getLabel(dsInfo['variable'], i),
588 self.getLabel(dsInfo['variable'], i),
General Comments 0
You need to be logged in to leave comments. Login now