Skip to content

Commit

Permalink
Fix table.py for Python 3.8 (#297)
Browse files Browse the repository at this point in the history
Fixes:

fitsio/hdu/table.py:234: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if data.shape is ():
fitsio/hdu/table.py:234: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if data.shape is ():

Error found in Homebrew/homebrew-core#47326
  • Loading branch information
iMichka authored Apr 4, 2020
1 parent 3bf4d48 commit 034c75c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fitsio/hdu/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ def write(self, data, firstrow=0, columns=None, names=None, slow=False,
"write_column to write to a single column, "
"or instead write to an image hdu")

if data.shape is ():
if data.shape == ():
raise ValueError("cannot write data with shape ()")

isrec = True
Expand Down

0 comments on commit 034c75c

Please sign in to comment.