Skip to content

Commit d03ab4c

Browse files
committed
fix JAX imports
1 parent e7a66fe commit d03ab4c

3 files changed

Lines changed: 21 additions & 15 deletions

File tree

autoarray/mask/abstract_mask.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -73,17 +73,17 @@ def pixel_scale(self) -> float:
7373
For a mask with dimensions two or above check that are pixel scales are the same, and if so return this
7474
single value as a float.
7575
"""
76-
for pixel_scale in self.pixel_scales:
77-
if abs(pixel_scale - self.pixel_scales[0]) > 1.0e-8:
78-
logger.warning(
79-
f"""
80-
The Mask has different pixel scales in each dimensions, which are {self.pixel_scales}.
81-
82-
This is not expected, and will lead to unexpected behaviour in the grid and mask classes.
83-
The code will continue to run, but you should check that the pixel scales are as you expect and
84-
that associated data structures (e.g. grids) are behaving as you expect.
85-
"""
86-
)
76+
# for pixel_scale in self.pixel_scales:
77+
# if abs(pixel_scale - self.pixel_scales[0]) > 1.0e-8:
78+
# logger.warning(
79+
# f"""
80+
# The Mask has different pixel scales in each dimensions, which are {self.pixel_scales}.
81+
#
82+
# This is not expected, and will lead to unexpected behaviour in the grid and mask classes.
83+
# The code will continue to run, but you should check that the pixel scales are as you expect and
84+
# that associated data structures (e.g. grids) are behaving as you expect.
85+
# """
86+
# )
8787

8888
return self.pixel_scales[0]
8989

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
from .array import ArrayTriangles
2-
from .jax_array import ArrayTriangles as JAXArrayTriangles
2+
try:
3+
from .jax_array import ArrayTriangles as JAXArrayTriangles
4+
except ImportError:
5+
pass
Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
from .coordinate_array import CoordinateArrayTriangles
2-
from .jax_coordinate_array import (
3-
CoordinateArrayTriangles as JAXCoordinateArrayTriangles,
4-
)
2+
try:
3+
from .jax_coordinate_array import (
4+
CoordinateArrayTriangles as JAXCoordinateArrayTriangles,
5+
)
6+
except ImportError:
7+
pass

0 commit comments

Comments
 (0)