Skip to content

Commit

Permalink
Merge branch 'fix_on_memory'
Browse files Browse the repository at this point in the history
# Conflicts:
#	ncempy/io/dm.py
  • Loading branch information
ercius committed May 29, 2020
2 parents ac1ef41 + b58b095 commit f6df731
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ncempy/io/dm.py
Original file line number Diff line number Diff line change
Expand Up @@ -961,6 +961,10 @@ def getDataset(self, index):
outputDict['pixelSize'] = self.scale[jj:jj + self.dataShape[ii]][::-1]
outputDict['pixelOrigin'] = self.origin[jj:jj + self.dataShape[ii]][::-1]

# Ensure the data is loaded into memory from the buffer
if self._on_memory:
outputDict['data'] = np.array(outputDict['data'])

# Remove singular dimensions if present
outputDict['data'] = np.squeeze(outputDict['data'])
return outputDict
Expand Down

0 comments on commit f6df731

Please sign in to comment.