-
Notifications
You must be signed in to change notification settings - Fork 45
Closed
Description
Ryan is getting zero divide in this code:
rhos = np.fromiter(
(
abs(costs[s][ndn, i]/loc_denom[s][ndn, i])
for i, v in enumerate(node.nonant_vardata_list)
),
dtype="d",
count=nlens[ndn],
)
File "/storage/project/r-dmolzahn6-0/rpiansky3/venvs/ph_batts_py310/src/mpi-sppy/mpisppy/extensions/grad_rho.py", line 211, in
abs(costs[s][ndn, i]/loc_denom[s][ndn, i])
Unless someone has a better idea, I am inclined to do an out=np.xxxx with a where=loc_denom[s][ndn, i] != 0
for xxxx, I am inclined to use np.ones(1), but I can see how one might think a large value makes more sense.
Metadata
Metadata
Assignees
Labels
No labels