Skip to content

Commit

Permalink
more casting to array
Browse files Browse the repository at this point in the history
  • Loading branch information
rhayes777 committed Dec 18, 2023
1 parent 2fb990b commit ee292df
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion autoarray/mask/derive/grid_2d.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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,
Expand Down
6 changes: 4 additions & 2 deletions autoarray/operators/transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ee292df

Please sign in to comment.