Skip to content

Commit

Permalink
fix None comparisons triggering warnings in numpy 1.9
Browse files Browse the repository at this point in the history
  • Loading branch information
olaurino committed Apr 14, 2015
1 parent 428b216 commit 61fbfcd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sherpa/astro/io/pyfits_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,13 +171,13 @@ def _require_col(hdu, name, dtype=SherpaFloat, fix_type=False):

def _require_tbl_col(hdu, name, dtype=SherpaFloat, fix_type=False):
col = _try_tbl_col(hdu, name, dtype, fix_type)
if len(col) > 0 and col[0]==None:
if len(col) > 0 and col[0] is None:
raise IOErr('reqcol', name, hdu._file.name)
return col

def _require_vec(hdu, name, size=2, dtype=SherpaFloat, fix_type=False):
col = _try_vec(hdu, name, size, dtype, fix_type)
if None in list(col):
if numpy.equal(col, None).any():
raise IOErr('reqcol', name, hdu._file.name)
return col

Expand Down

0 comments on commit 61fbfcd

Please sign in to comment.