From 034c75c2e42950156656e0b6c48495cea9564b75 Mon Sep 17 00:00:00 2001 From: Michka Popoff Date: Sat, 4 Apr 2020 20:54:06 +0200 Subject: [PATCH] Fix table.py for Python 3.8 (#297) 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 https://github.com/Homebrew/homebrew-core/pull/47326 --- fitsio/hdu/table.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fitsio/hdu/table.py b/fitsio/hdu/table.py index 26582d88..44b1811f 100644 --- a/fitsio/hdu/table.py +++ b/fitsio/hdu/table.py @@ -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