mirror of
				https://github.com/fjosw/pyerrors.git
				synced 2025-11-04 09:35:45 +01:00 
			
		
		
		
	feat: additional check for invalid input to least_squares added.
Co-authored-by: Simon Kuberski <simon.kuberski@uni-muenster.de>
This commit is contained in:
		
					parent
					
						
							
								59d22fceee
							
						
					
				
			
			
				commit
				
					
						088f4d1239
					
				
			
		
					 1 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
					@ -164,7 +164,8 @@ def least_squares(x, y, func, priors=None, silent=False, **kwargs):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    elif (type(x) == dict and type(y) == dict and type(func) == dict):
 | 
					    elif (type(x) == dict and type(y) == dict and type(func) == dict):
 | 
				
			||||||
        return _combined_fit(x, y, func, silent=silent, **kwargs)
 | 
					        return _combined_fit(x, y, func, silent=silent, **kwargs)
 | 
				
			||||||
 | 
					    elif (type(x) == dict or type(y) == dict or type(func) == dict):
 | 
				
			||||||
 | 
					        raise TypeError("All arguments have to be dictionaries in order to perform a combined fit.")
 | 
				
			||||||
    else:
 | 
					    else:
 | 
				
			||||||
        return _standard_fit(x, y, func, silent=silent, **kwargs)
 | 
					        return _standard_fit(x, y, func, silent=silent, **kwargs)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue