Skip to content

Commit

Permalink
Change "== None" to "is None"
Browse files Browse the repository at this point in the history
  • Loading branch information
r-owen committed Aug 20, 2016
1 parent 008459f commit 9bcb9e2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/plotHistogram.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def plotHistogram(coaddName, weightMapName):
weightMapData = weightMap[0].data
chiSqOrder = weightMapData.max()
coaddData = coadd[0].data
if coaddData == None: # handle MEF
if coaddData is None: # handle MEF
coaddData = coadd[1].data
if coaddData.shape != weightMapData.shape:
raise RuntimeError("Image shape = %s != %s = weight map shape" %
Expand Down
2 changes: 1 addition & 1 deletion examples/simplePlotHistogram.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

image = pyfits.open(imagePath)
imageData = image[0].data
if imageData == None: # handle MEF
if imageData is None: # handle MEF
imageData = image[1].data
# get rid of nans and take square root
goodData = np.ma.array(imageData.flat, mask=np.isnan(imageData.flat)).compressed()
Expand Down

0 comments on commit 9bcb9e2

Please sign in to comment.