@@ -640,38 +640,38 @@ def test_singlediode_floats(sam_data):
640
640
module = 'Example_Module'
641
641
module_parameters = sam_data ['cecmod' ][module ]
642
642
out = pvsystem .singlediode (7 , 6e-7 , .1 , 20 , .5 )
643
- expected = {'i_xx' : 4.2685798754011426 ,
644
- 'i_mp' : 6.1390251797935704 ,
645
- 'v_oc' : 8.1063001465863085 ,
646
- 'p_mp' : 38.194165464983037 ,
647
- 'i_x' : 6.7556075876880621 ,
648
- 'i_sc' : 6.9646747613963198 ,
649
- 'v_mp' : 6.221535886625464 ,
643
+ expected = {'i_xx' : 4.2498 ,
644
+ 'i_mp' : 6.1275 ,
645
+ 'v_oc' : 8.1063 ,
646
+ 'p_mp' : 38.1937 ,
647
+ 'i_x' : 6.7558 ,
648
+ 'i_sc' : 6.9651 ,
649
+ 'v_mp' : 6.2331 ,
650
650
'i' : None ,
651
651
'v' : None }
652
652
assert isinstance (out , dict )
653
653
for k , v in out .items ():
654
654
if k in ['i' , 'v' ]:
655
655
assert v is None
656
656
else :
657
- assert_allclose (v , expected [k ], atol = 3 )
657
+ assert_allclose (v , expected [k ], atol = 1e- 3 )
658
658
659
659
660
660
@requires_scipy
661
661
def test_singlediode_floats_ivcurve ():
662
662
out = pvsystem .singlediode (7 , 6e-7 , .1 , 20 , .5 , ivcurve_pnts = 3 )
663
- expected = {'i_xx' : 4.2685798754011426 ,
664
- 'i_mp' : 6.1390251797935704 ,
665
- 'v_oc' : 8.1063001465863085 ,
666
- 'p_mp' : 38.194165464983037 ,
667
- 'i_x' : 6.7556075876880621 ,
668
- 'i_sc' : 6.9646747613963198 ,
669
- 'v_mp' : 6.221535886625464 ,
663
+ expected = {'i_xx' : 4.2498 ,
664
+ 'i_mp' : 6.1275 ,
665
+ 'v_oc' : 8.1063 ,
666
+ 'p_mp' : 38.1937 ,
667
+ 'i_x' : 6.7558 ,
668
+ 'i_sc' : 6.9651 ,
669
+ 'v_mp' : 6.2331 ,
670
670
'i' : np .array ([6.965172e+00 , 6.755882e+00 , 2.575717e-14 ]),
671
671
'v' : np .array ([0. , 4.05315 , 8.1063 ])}
672
672
assert isinstance (out , dict )
673
673
for k , v in out .items ():
674
- assert_allclose (v , expected [k ], atol = 3 )
674
+ assert_allclose (v , expected [k ], atol = 1e- 3 )
675
675
676
676
677
677
@requires_scipy
0 commit comments