From 03296ab94b1f1e7586bb4b3e55226a17d38c0733 Mon Sep 17 00:00:00 2001 From: markus holzer <markus.holzer@fau.de> Date: Wed, 10 Feb 2021 17:36:16 +0100 Subject: [PATCH] Fix warnings --- pystencils/fd/finitedifferences.py | 6 +++--- pystencils_tests/test_types.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pystencils/fd/finitedifferences.py b/pystencils/fd/finitedifferences.py index 20d071793..dd5c2e39d 100644 --- a/pystencils/fd/finitedifferences.py +++ b/pystencils/fd/finitedifferences.py @@ -338,7 +338,7 @@ def discretize_staggered(term, symbols_to_field_dict, coordinate, coordinate_off offset = [0] * dim offset[coordinate] = coordinate_offset - offset = np.array(offset, dtype=np.int) + offset = np.array(offset, dtype=int) gradient = grad(symbols)[coordinate] substitutions.update({s: (field[offset](i) + field(i)) / 2 for i, s in enumerate(symbols)}) @@ -386,7 +386,7 @@ def discretize_divergence(vector_term, symbols_to_field_dict, dx): def __up_down_offsets(d, dim): coord = [0] * dim coord[d] = 1 - up = np.array(coord, dtype=np.int) + up = np.array(coord, dtype=int) coord[d] = -1 - down = np.array(coord, dtype=np.int) + down = np.array(coord, dtype=int) return up, down diff --git a/pystencils_tests/test_types.py b/pystencils_tests/test_types.py index 381130f06..cb6bddd8d 100644 --- a/pystencils_tests/test_types.py +++ b/pystencils_tests/test_types.py @@ -114,8 +114,8 @@ def test_Basic_data_type(): assert s.dtype.is_uint() assert s.dtype.is_complex() == 0 - assert typed_symbols(("s"), np.str).dtype.is_other() - assert typed_symbols(("s"), np.bool).dtype.is_other() + assert typed_symbols(("s"), str).dtype.is_other() + assert typed_symbols(("s"), bool).dtype.is_other() assert typed_symbols(("s"), np.void).dtype.is_other() assert typed_symbols(("s"), np.float64).dtype.base_name == 'double' -- GitLab