Control: tag -1 + patch I haven't tested this beyond the autopkgtest, but it seems to work, so I'll NMU it.
SR -- Stefano Rivera http://tumbleweed.org.za/ +1 415 683 3272
From: Stefano Rivera <stefa...@debian.org> Date: Sun, 8 Jan 2023 15:29:25 -0400 Subject: Replace numpy types with builtin types where appropriate Supports Numpy > 1.24 Bug-Debian: https://bugs.debian.org/1027213 --- gavo/base/typesystems.py | 10 +++++----- gavo/formats/fitstable.py | 2 +- gavo/votable/simple.py | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/gavo/base/typesystems.py b/gavo/base/typesystems.py index 0e4223e..33b4827 100644 --- a/gavo/base/typesystems.py +++ b/gavo/base/typesystems.py @@ -139,11 +139,11 @@ class ToNumpyConverter(FromSQLConverter): "integer": numpy.int32, "bigint": numpy.int64, "real": numpy.float32, - "boolean": numpy.bool, + "boolean": bool, "double precision": numpy.float64, - "text": numpy.str, - "unicode": numpy.str, - "char": numpy.str, + "text": str, + "unicode": str, + "char": str, "date": numpy.float32, "timestamp": numpy.float64, "time": numpy.float32, @@ -151,7 +151,7 @@ class ToNumpyConverter(FromSQLConverter): def mapComplex(self, type, length): if type in self._charTypes: - return numpy.str + return str class ToPythonBase(FromSQLConverter): diff --git a/gavo/formats/fitstable.py b/gavo/formats/fitstable.py index b30c740..0de05bb 100644 --- a/gavo/formats/fitstable.py +++ b/gavo/formats/fitstable.py @@ -128,7 +128,7 @@ def _makeValueArray(values, colInd, colDesc): # That's a variable-length array that we'll fill from a # numpy object array return typecode, numpy.array([list(v[colInd]) for v in values], - dtype=numpy.object) + dtype=object) elif length>1: # numpy 1:1.12.1-3 and pyfits from astropy 1.3-8 apparently diff --git a/gavo/votable/simple.py b/gavo/votable/simple.py index 1ff2ac7..acaf6fc 100644 --- a/gavo/votable/simple.py +++ b/gavo/votable/simple.py @@ -24,7 +24,7 @@ try: "long": numpy.int64, "float": numpy.float32, "double": numpy.float64, - "boolean": numpy.bool, + "boolean": bool, "char": numpy.str_, "floatComplex": numpy.complex64, "doubleComplex": numpy.complex128,