Skip to content

Commit 33138b5

Browse files
committed
STY: fix anal PEP8 complaint
PEP8 didn't like the indent, and my editor does, so change the syntax to make PEP8 and my editor agree.
1 parent c800493 commit 33138b5

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

nibabel/dataobj_images.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -340,9 +340,10 @@ def get_fdata(self, caching='fill', dtype=np.float64):
340340
dtype = np.dtype(dtype)
341341
if not issubclass(dtype.type, np.inexact):
342342
raise ValueError('{} should be floating point type'.format(dtype))
343-
if (self._fdata_cache is not None and
344-
self._fdata_cache.dtype.type == dtype.type):
345-
return self._fdata_cache
343+
# Return cache if cache present and of correct dtype.
344+
if self._fdata_cache is not None:
345+
if self._fdata_cache.dtype.type == dtype.type:
346+
return self._fdata_cache
346347
data = np.asanyarray(self._dataobj).astype(dtype)
347348
if caching == 'fill':
348349
self._fdata_cache = data

0 commit comments

Comments
 (0)