diff --git a/nibabel/cifti2/cifti2.py b/nibabel/cifti2/cifti2.py index 0ffe45a169..67dab1d0c2 100644 --- a/nibabel/cifti2/cifti2.py +++ b/nibabel/cifti2/cifti2.py @@ -287,7 +287,7 @@ def rgba(self): return (self.red, self.green, self.blue, self.alpha) def _to_xml_element(self): - if self.label is '': + if self.label == '': raise Cifti2HeaderError('Label needs a name') try: v = int(self.key) diff --git a/nibabel/streamlines/tck.py b/nibabel/streamlines/tck.py index 31f0be0ab5..9b1888ebba 100644 --- a/nibabel/streamlines/tck.py +++ b/nibabel/streamlines/tck.py @@ -390,10 +390,6 @@ def _read(cls, fileobj, header, buffer_size=4): buffer_size = int(buffer_size * MEGABYTE) buffer_size += coordinate_size - (buffer_size % coordinate_size) - # Markers for streamline end and file end - fiber_marker = cls.FIBER_DELIMITER.astype(dtype).tostring() - eof_marker = cls.EOF_DELIMITER.astype(dtype).tostring() - with Opener(fileobj) as f: start_position = f.tell() @@ -401,7 +397,7 @@ def _read(cls, fileobj, header, buffer_size=4): f.seek(header["_offset_data"], os.SEEK_SET) eof = False - buffs = [] + leftover = np.empty((0, 3), dtype='