From 67f0ab2ce8871fa0c999ac5cf1b687f80d3eb9b4 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Mon, 22 Feb 2021 08:35:15 +0100 Subject: [PATCH] silence deprecation warning --- python/damask/util.py | 2 +- python/tests/test_Grid.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python/damask/util.py b/python/damask/util.py index fb122bd11..cda532bc0 100644 --- a/python/damask/util.py +++ b/python/damask/util.py @@ -183,7 +183,7 @@ def scale_to_coprime(v): # Python 3.9 provides math.lcm, see https://stackoverflow.com/questions/51716916. return a * b // np.gcd(a, b) - m = (np.array(v) * reduce(lcm, map(lambda x: int(get_square_denominator(x)),v)) ** 0.5).astype(np.int) + m = (np.array(v) * reduce(lcm, map(lambda x: int(get_square_denominator(x)),v)) ** 0.5).astype(int) m = m//reduce(np.gcd,m) with np.errstate(invalid='ignore'): diff --git a/python/tests/test_Grid.py b/python/tests/test_Grid.py index 48831f917..a239165db 100644 --- a/python/tests/test_Grid.py +++ b/python/tests/test_Grid.py @@ -347,7 +347,7 @@ class TestGrid: @pytest.mark.parametrize('approach',['Laguerre','Voronoi']) def test_tessellate_bicrystal(self,approach): cells = np.random.randint(5,10,3)*2 - size = cells.astype(np.float) + size = cells.astype(float) seeds = np.vstack((size*np.array([0.5,0.25,0.5]),size*np.array([0.5,0.75,0.5]))) material = np.zeros(cells) material[:,cells[1]//2:,:] = 1