diff options
author | Picca Frédéric-Emmanuel <picca@debian.org> | 2018-08-02 20:54:28 +0200 |
---|---|---|
committer | Picca Frédéric-Emmanuel <picca@debian.org> | 2018-08-02 20:54:28 +0200 |
commit | 0c737c7331790e9825a69d65b26d08075aded68a (patch) | |
tree | cad7520f2899b8bd84abca0526f32da32eb6b90b /PyMca5/PyMcaIO/MarCCD.py | |
parent | a9695cd9edb7b272e0b2dcd20882c2580dd9fb61 (diff) |
New upstream version 5.3.2+dfsg
Diffstat (limited to 'PyMca5/PyMcaIO/MarCCD.py')
-rw-r--r-- | PyMca5/PyMcaIO/MarCCD.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/PyMca5/PyMcaIO/MarCCD.py b/PyMca5/PyMcaIO/MarCCD.py index fc37031..f2d0c8e 100644 --- a/PyMca5/PyMcaIO/MarCCD.py +++ b/PyMca5/PyMcaIO/MarCCD.py @@ -64,11 +64,11 @@ class MarCCD(object): depth = info["depth"] fd.seek(4096) if depth == 1: - data = numpy.fromstring(fd.read(nbytes), numpy.uint8) + data = numpy.array(numpy.frombuffer(fd.read(nbytes), numpy.uint8)) elif depth == 2: - data = numpy.fromstring(fd.read(nbytes), numpy.uint16) + data = numpy.array(numpy.frombuffer(fd.read(nbytes), numpy.uint16)) elif depth == 4: - data = numpy.fromstring(fd.read(nbytes), numpy.uint32) + data = numpy.array(numpy.frombuffer(fd.read(nbytes), numpy.uint32)) if swap: data = data.byteswap() data.shape = info["nfast"], info["nslow"] @@ -155,7 +155,7 @@ class MccdHeader(object): if 0: self.__format = struct.unpack("256I", self.raw[0:256*4]) else: - self.__format = numpy.fromstring(self.raw[0:256*4], numpy.uint32) + self.__format = numpy.array(numpy.frombuffer(self.raw[0:256*4], numpy.uint32)) def __unpack_gonio(self): idx= 640 |