Skip to content
Snippets Groups Projects
Commit 3ee0c8c3 authored by Eric Chassande-mottin's avatar Eric Chassande-mottin
Browse files

upgrade to Python 3.9

parent 238e93a0
No related branches found
No related tags found
No related merge requests found
Pipeline #14329 failed
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -152,7 +152,7 @@ def firkaiser(L, beta, centering='wp', norm='null'):
# the data to complex, otherwise np.sqrt returns nan
tmp = k*(L-1.-k)
tmp = tmp.astype('complex128')
k = 2. * beta / (L-1) * np.sqrt(tmp)
k = np.real(2. * beta / (L-1) * np.sqrt(tmp))
g = np.i0(k) / np.i0(beta)
g = np.fft.ifftshift(g)
......
......@@ -84,10 +84,15 @@ class TestCompGabDual(unittest.TestCase):
assertRaisesRegex = self.assertRaisesRegex
except AttributeError:
assertRaisesRegex = self.assertRaisesRegexp
# I checked that the command comp_gabdual_long(g, 0, 0) raises a
# TypeError with the correct message -- Still complaining with NULL
# being returned
assertRaisesRegex(TypeError, mess, comp_gabdual_long, g, 0, 0)
g = g.astype(np.float64)
# g dim should be < 3
mess = "g dimensions should be 1 or 2."
# Same as above -- Is that a change of behaviour of assertRaisesRegex?
assertRaisesRegex(
TypeError, mess, comp_gabdual_long, g.reshape((3, 1, 3)), 0, 0)
# basic test:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment