Skip to content

Commit ad33991

Browse files
Jammy2211Jammy2211
authored andcommitted
fix pos neg
1 parent 9b97bcb commit ad33991

File tree

1 file changed

+1
-20
lines changed

1 file changed

+1
-20
lines changed

autoarray/inversion/inversion/inversion_util.py

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -231,26 +231,7 @@ def reconstruction_positive_negative_from(
231231
curvature_reg_matrix
232232
The curvature_matrix plus regularization matrix, overwriting the curvature_matrix in memory.
233233
"""
234-
try:
235-
reconstruction = jnp.linalg.solve(curvature_reg_matrix, data_vector)
236-
except np.linalg.LinAlgError as e:
237-
raise exc.InversionException() from e
238-
239-
if jnp.isnan(reconstruction).any():
240-
raise exc.InversionException
241-
242-
if (
243-
conf.instance["general"]["inversion"]["check_reconstruction"]
244-
or force_check_reconstruction
245-
):
246-
for mapper_param_range in mapper_param_range_list:
247-
if np.allclose(
248-
a=reconstruction[mapper_param_range[0] : mapper_param_range[1]],
249-
b=reconstruction[mapper_param_range[0]],
250-
):
251-
raise exc.InversionException()
252-
253-
return reconstruction
234+
return jnp.linalg.solve(curvature_reg_matrix, data_vector)
254235

255236

256237
def reconstruction_positive_only_from(

0 commit comments

Comments
 (0)