From ee292dfdc1da9aa3d2b7386f14485f254fbfad35 Mon Sep 17 00:00:00 2001 From: Richard Date: Mon, 18 Dec 2023 09:39:49 +0000 Subject: [PATCH] more casting to array --- autoarray/mask/derive/grid_2d.py | 3 ++- autoarray/operators/transformer.py | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/autoarray/mask/derive/grid_2d.py b/autoarray/mask/derive/grid_2d.py index a589427c1..a6ee331a1 100644 --- a/autoarray/mask/derive/grid_2d.py +++ b/autoarray/mask/derive/grid_2d.py @@ -1,6 +1,7 @@ from __future__ import annotations import logging from typing import TYPE_CHECKING +import numpy as np if TYPE_CHECKING: from autoarray.mask.mask_2d import Mask2D @@ -225,7 +226,7 @@ def unmasked_sub_1(self) -> Grid2D: from autoarray.structures.grids.uniform_2d import Grid2D grid_slim = grid_2d_util.grid_2d_slim_via_mask_from( - mask_2d=self.mask, + mask_2d=np.array(self.mask), pixel_scales=self.mask.pixel_scales, sub_size=1, origin=self.mask.origin, diff --git a/autoarray/operators/transformer.py b/autoarray/operators/transformer.py index 55d28ca13..d318a6b82 100644 --- a/autoarray/operators/transformer.py +++ b/autoarray/operators/transformer.py @@ -70,11 +70,13 @@ def __init__(self, uv_wavelengths, real_space_mask, preload_transform=True): if preload_transform: self.preload_real_transforms = transformer_util.preload_real_transforms( - grid_radians=self.grid, uv_wavelengths=self.uv_wavelengths + grid_radians=np.array(self.grid), + uv_wavelengths=self.uv_wavelengths, ) self.preload_imag_transforms = transformer_util.preload_imag_transforms( - grid_radians=self.grid, uv_wavelengths=self.uv_wavelengths + grid_radians=np.array(self.grid), + uv_wavelengths=self.uv_wavelengths, ) self.real_space_pixels = self.real_space_mask.pixels_in_mask