diff --git a/doc/notebooks/demo_thermalized_lbm.ipynb b/doc/notebooks/demo_thermalized_lbm.ipynb index 9fa38e56401de5f5912a6a40a5ebdef67f752115..42a1653e5746d4245c0d0e3da4375e937d2165dc 100644 --- a/doc/notebooks/demo_thermalized_lbm.ipynb +++ b/doc/notebooks/demo_thermalized_lbm.ipynb @@ -94,7 +94,7 @@ " " ], "text/plain": [ - "<lbmpy.methods.momentbased.momentbasedmethod.MomentBasedLbMethod at 0x7fee5d180fd0>" + "<lbmpy.methods.momentbased.momentbasedmethod.MomentBasedLbMethod at 0x7f53ba131fa0>" ] }, "execution_count": 2, @@ -182,7 +182,7 @@ " " ], "text/plain": [ - "<lbmpy.methods.momentbased.momentbasedmethod.MomentBasedLbMethod at 0x7fee54d8ee80>" + "<lbmpy.methods.momentbased.momentbasedmethod.MomentBasedLbMethod at 0x7f53b1d12a90>" ] }, "execution_count": 3, @@ -265,7 +265,7 @@ "\n", "linear_congruent_rng_eqs = [ps.Assignment(seedField(i), seedField(i) * 1664525 + 1013904223) \n", " for i, _ in enumerate(random_number_symbols)]\n", - "floatEqs = [ps.Assignment(ps.TypedSymbol(s.name, np.float), seedField(i) / max_seed_type)\n", + "floatEqs = [ps.Assignment(ps.TypedSymbol(s.name, np.float64), seedField(i) / max_seed_type)\n", " for i, s in enumerate(random_number_symbols)]\n", " \n", "rng_eqs = linear_congruent_rng_eqs + floatEqs + [ps.Assignment(debug_output.center, seedField(0) / max_seed_type)]\n", diff --git a/lbmpy/geometry.py b/lbmpy/geometry.py index 0cd60217dc46c9920585f494186488ea2427dad1..4c50ed7f7c22665e21d384513457ae1ac02c0e80 100644 --- a/lbmpy/geometry.py +++ b/lbmpy/geometry.py @@ -231,17 +231,17 @@ def add_black_and_white_image(boundary_handling, image_file, target_slice=None, # binarize zoomed_image[zoomed_image <= 254] = 0 zoomed_image[zoomed_image > 254] = 1 - zoomed_image = np.logical_not(zoomed_image.astype(np.bool)) + zoomed_image = np.logical_not(zoomed_image.astype(bool)) # resize necessary if aspect ratio should be constant if zoomed_image.shape != target_size: - resized_image = np.zeros(target_size, dtype=np.bool) + resized_image = np.zeros(target_size, dtype=bool) mid = [(ts - s) // 2 for ts, s in zip(target_size, zoomed_image.shape)] resized_image[mid[0]:zoomed_image.shape[0] + mid[0], mid[1]:zoomed_image.shape[1] + mid[1]] = zoomed_image zoomed_image = resized_image def callback(*coordinates): - result = np.zeros_like(coordinates[0], dtype=np.bool) + result = np.zeros_like(coordinates[0], dtype=bool) mask_start = [int(coordinates[i][(0,) * dim] - 0.5) for i in range(dim)] mask_end = [int(coordinates[i][(-1,) * dim] + 1 - 0.5) for i in range(dim)] diff --git a/lbmpy_tests/test_geometry_setup_serial.py b/lbmpy_tests/test_geometry_setup_serial.py index 7c185fd88dc54babc2f0cb9545640737aa6ef08d..3ef30ff912928098987b1ad995a45f00960307d8 100644 --- a/lbmpy_tests/test_geometry_setup_serial.py +++ b/lbmpy_tests/test_geometry_setup_serial.py @@ -63,6 +63,6 @@ def test_slice_mask_combination(): print("x", coordinates[0][:, 0]) print("y", coordinates[1][0, :]) print(x.shape) - return np.ones_like(x, dtype=np.bool) + return np.ones_like(x, dtype=bool) sc.boundary_handling.set_boundary(NoSlip(), make_slice[6:7, -1], callback)