@@ -56,7 +56,8 @@ def test__update_io(voc, iph, io, rs, rsh, nnsvth, expected):
5656 (2. , 2. , 2. , 2. , 2. , 0. ),
5757 (- 1. , - 1. , - 1. , - 1. , - 1. , - 1. )])
5858def test__update_io_nan (voc , iph , io , rs , rsh , nnsvth ):
59- outio = _update_io (voc , iph , io , rs , rsh , nnsvth )
59+ with np .errstate (invalid = 'ignore' , divide = 'ignore' ):
60+ outio = _update_io (voc , iph , io , rs , rsh , nnsvth )
6061 assert np .isnan (outio )
6162
6263
@@ -89,13 +90,14 @@ def test__calc_theta_phi_exact_one_nan():
8990
9091
9192def test__calc_theta_phi_exact_vector ():
92- theta , phi = _calc_theta_phi_exact (imp = np .array ([1. , - 1. ]),
93- iph = np .array ([- 1. , 1. ]),
94- vmp = np .array ([1. , - 1. ]),
95- io = np .array ([- 1. , 1. ]),
96- nnsvth = np .array ([1. , - 1. ]),
97- rs = np .array ([- 1. , 1. ]),
98- rsh = np .array ([1. , - 1. ]))
93+ with np .errstate (invalid = 'ignore' ):
94+ theta , phi = _calc_theta_phi_exact (imp = np .array ([1. , - 1. ]),
95+ iph = np .array ([- 1. , 1. ]),
96+ vmp = np .array ([1. , - 1. ]),
97+ io = np .array ([- 1. , 1. ]),
98+ nnsvth = np .array ([1. , - 1. ]),
99+ rs = np .array ([- 1. , 1. ]),
100+ rsh = np .array ([1. , - 1. ]))
99101 assert np .isnan (theta [0 ])
100102 assert np .isnan (theta [1 ])
101103 assert np .isnan (phi [0 ])
0 commit comments