From 5923cc72f214f5520728b5df3d6b0ff6547b50de Mon Sep 17 00:00:00 2001 From: Simon Perkins Date: Tue, 30 Jan 2024 18:42:30 +0200 Subject: [PATCH] Suppress ComplexWarning --- daskms/tests/test_dataset.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/daskms/tests/test_dataset.py b/daskms/tests/test_dataset.py index 44d1f18f..590eec55 100644 --- a/daskms/tests/test_dataset.py +++ b/daskms/tests/test_dataset.py @@ -3,6 +3,7 @@ from itertools import product import os import uuid +import warnings import dask import dask.array as da @@ -305,7 +306,9 @@ def test_dataset_add_column(ms, dtype): ds = datasets[0] # Create the dask array - bitflag = da.zeros_like(ds.DATA.data, dtype=dtype) + with warnings.catch_warnings(): + warnings.simplefilter("ignore", np.exceptions.ComplexWarning) + bitflag = da.zeros_like(ds.DATA.data, dtype=dtype) # Assign keyword attribute col_kw = { "BITFLAG": {