From 4a94c82a1046282f6503b586a3016d36209da187 Mon Sep 17 00:00:00 2001 From: Julian Winkler Date: Sun, 12 May 2024 08:09:57 +0200 Subject: [PATCH 1/2] replace np.float with np.float64 and np.complex with np.complex128 np.float and np.complex where deprecated and have been removed in latest numpy release --- vampyre/estim/gaussian.py | 2 +- vampyre/trans/convolve2d.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vampyre/estim/gaussian.py b/vampyre/estim/gaussian.py index b545f79..ca3e498 100644 --- a/vampyre/estim/gaussian.py +++ b/vampyre/estim/gaussian.py @@ -44,7 +44,7 @@ def __init__(self, zmean, zvar, shape,name=None,\ if is_complex: dtype = np.double else: - dtype = np.complex + dtype = np.complex128 BaseEst.__init__(self,shape=shape,dtype=dtype,name=name, var_axes=var_axes,type_name='GaussEst', cost_avail=True) diff --git a/vampyre/trans/convolve2d.py b/vampyre/trans/convolve2d.py index 94bca96..ac9497c 100644 --- a/vampyre/trans/convolve2d.py +++ b/vampyre/trans/convolve2d.py @@ -67,7 +67,7 @@ def __init__(self,shape,kernel,is_complex=False,im_axes=(0,1)): self.srep_axes = self.chan_axes # Superclass constructor - dtype = np.float + dtype = np.float64 BaseLinTrans.__init__(self, shape, shape, dtype, dtype,\ svd_avail=True,name='Convolve2D') From f88c9ebe9630f587aeee2119e817303dd815a24a Mon Sep 17 00:00:00 2001 From: Julian Winkler Date: Sun, 12 May 2024 08:15:24 +0200 Subject: [PATCH 2/2] gaussian.py: fix swapped dtypes compex and double were swapped. It doesn't seem to be used currently, but it was clearly wrong. --- vampyre/estim/gaussian.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vampyre/estim/gaussian.py b/vampyre/estim/gaussian.py index ca3e498..34ea067 100644 --- a/vampyre/estim/gaussian.py +++ b/vampyre/estim/gaussian.py @@ -42,9 +42,9 @@ def __init__(self, zmean, zvar, shape,name=None,\ if np.isscalar(shape): shape = (shape,) if is_complex: - dtype = np.double - else: dtype = np.complex128 + else: + dtype = np.double BaseEst.__init__(self,shape=shape,dtype=dtype,name=name, var_axes=var_axes,type_name='GaussEst', cost_avail=True)