Skip to content

Commit

Permalink
applying npfloat128
Browse files Browse the repository at this point in the history
  • Loading branch information
Krisha authored and KrishaKumaleManandhar committed Dec 26, 2024
1 parent a480c9c commit c4ee93d
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions causing/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,14 @@ def compute(
# )
computed_yvars = []
for eq_in in eq_inputs:
try:
computed_yvars.append(eq(*eq_in, *parameters.values()))
except FloatingPointError:
# Floating Point Error for self.yvars[i]
# Adding 0.0 to overcome this.
computed_yvars.append(0.0)
eq_in = [np.float128(value) for value in eq_in]
computed_yvars.append(eq(*eq_in, *parameters.values()))
# try:
# computed_yvars.append(eq(*eq_in, *parameters.values()))
# except FloatingPointError:
# # Floating Point Error for self.yvars[i]
# # Adding 0.0 to overcome this.
# computed_yvars.append(0.0)

yhat[i] = np.array(
computed_yvars,
Expand Down

0 comments on commit c4ee93d

Please sign in to comment.