We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 617ba67 commit 589cfecCopy full SHA for 589cfec
ot/lp/solver_1d.py
@@ -791,10 +791,12 @@ def binary_search_circle(
791
-1, 1
792
)
793
794
- mask_end = mask * (nx.abs(dCptm - dCmtp) > 0.001)
795
- tc[mask_end > 0] = (
796
- (Ctp - Ctm + tm * dCptm - tp * dCmtp) / (dCptm - dCmtp)
797
- )[mask_end > 0]
+ with warnings.catch_warnings():
+ warnings.simplefilter("ignore", category=RuntimeWarning)
+ mask_end = mask * (nx.abs(dCptm - dCmtp) > 0.001)
+ tc[mask_end > 0] = (
798
+ (Ctp - Ctm + tm * dCptm - tp * dCmtp) / (dCptm - dCmtp)
799
+ )[mask_end > 0]
800
done[nx.prod(mask, axis=-1) > 0] = 1
801
elif nx.any(1 - done):
802
tm[((1 - mask) * (dCp < 0)) > 0] = tc[((1 - mask) * (dCp < 0)) > 0]
0 commit comments