@@ -640,38 +640,38 @@ def test_singlediode_floats(sam_data):
640640 module = 'Example_Module'
641641 module_parameters = sam_data ['cecmod' ][module ]
642642 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 ,
650650 'i' : None ,
651651 'v' : None }
652652 assert isinstance (out , dict )
653653 for k , v in out .items ():
654654 if k in ['i' , 'v' ]:
655655 assert v is None
656656 else :
657- assert_allclose (v , expected [k ], atol = 3 )
657+ assert_allclose (v , expected [k ], atol = 1e- 3 )
658658
659659
660660@requires_scipy
661661def test_singlediode_floats_ivcurve ():
662662 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 ,
670670 'i' : np .array ([6.965172e+00 , 6.755882e+00 , 2.575717e-14 ]),
671671 'v' : np .array ([0. , 4.05315 , 8.1063 ])}
672672 assert isinstance (out , dict )
673673 for k , v in out .items ():
674- assert_allclose (v , expected [k ], atol = 3 )
674+ assert_allclose (v , expected [k ], atol = 1e- 3 )
675675
676676
677677@requires_scipy
0 commit comments