#NEWLINE# def test_SolveUsingLevenbergMarquardt_2D( self ) : #NEWLINE# #INDENT# coefficientsShouldBe = numpy . array ( [ ( - 8.01913565 ) , 1.5264473 ] ) #NEWLINE# model = pyeq2 . Models_2D . Polynomial . Linear ( 'SSQABS' ) #NEWLINE# model . estimatedCoefficients = numpy . array ( [ ( - 4.0 ) , 2.0 ] ) #NEWLINE# pyeq2 . dataConvertorService ( ) . ConvertAndSortColumnarASCII ( DataForUnitTests . asciiDataInColumns_2D , model , False ) #NEWLINE# coefficients = pyeq2 . solverService ( ) . SolveUsingSelectedAlgorithm ( model , inAlgorithmName = 'Levenberg-Marquardt' ) #NEWLINE# self . assertTrue ( numpy . allclose ( coefficients , coefficientsShouldBe , rtol = 1e-06 , atol = 1e-300 ) )