@@ -390,8 +390,10 class HDFWriter(Operation): | |||
|
390 | 390 | dsDict['nDim'] = 0 |
|
391 | 391 | else: |
|
392 | 392 | if uniqueChannel: #Creates extra dimension to avoid the creation of multiple channels |
|
393 | dataAux = numpy.expand_dims(dataAux, axis=0) | |
|
394 | ||
|
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)) | |
|
395 | dataAux = getattr(self.dataOut, self.dataList[i]) | |
|
396 | #print(getattr(self.dataOut, self.dataList[i])) | |
|
395 | 397 | dsDict['nDim'] = len(dataAux.shape) |
|
396 | 398 | dsDict['shape'] = dataAux.shape |
|
397 | 399 | dsDict['dsNumber'] = dataAux.shape[0] |
@@ -588,10 +590,6 class HDFWriter(Operation): | |||
|
588 | 590 | dtsets.append(ds) |
|
589 | 591 | data.append((dsInfo['variable'], i)) |
|
590 | 592 | |
|
591 | if self.uniqueChannel: #Deletes extra dimension created to avoid the creation of multiple channels | |
|
592 | dataAux = getattr(self.dataOut, dsInfo['variable']) | |
|
593 | dataAux = dataAux[0] | |
|
594 | ||
|
595 | 593 | fp.flush() |
|
596 | 594 | |
|
597 | 595 | log.log('Creating file: {}'.format(fp.filename), self.name) |
@@ -614,6 +612,8 class HDFWriter(Operation): | |||
|
614 | 612 | ds[self.blockIndex] = getattr(self.dataOut, attr) |
|
615 | 613 | else: |
|
616 | 614 | ds[self.blockIndex] = getattr(self.dataOut, attr)[ch] |
|
615 | if self.uniqueChannel: #Deletes extra dimension created to avoid the creation of multiple channels | |
|
616 | setattr(self.dataOut, attr, getattr(self.dataOut, attr)[0]) | |
|
617 | 617 | |
|
618 | 618 | self.fp.flush() |
|
619 | 619 | self.blockIndex += 1 |
General Comments 0
You need to be logged in to leave comments.
Login now