2018-07-21 00:44:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{ stdenv, buildPythonPackage, fetchPypi, python
							 | 
						
					
						
							
								
									
										
										
										
											2017-06-05 22:04:28 +01:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								, gfortran, glibcLocales
							 | 
						
					
						
							
								
									
										
										
										
											2018-11-12 11:58:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								, numpy, scipy, pytest, pillow
							 | 
						
					
						
							
								
									
										
										
										
											2017-06-05 22:04:28 +01:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								buildPythonPackage rec {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  pname = "scikit-learn";
							 | 
						
					
						
							
								
									
										
										
										
											2019-04-16 19:15:40 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  version = "0.20.3";
							 | 
						
					
						
							
								
									
										
										
										
											2018-07-26 13:58:58 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  # UnboundLocalError: local variable 'message' referenced before assignment
							 | 
						
					
						
							
								
									
										
										
										
											2018-07-29 10:44:20 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  disabled = stdenv.isi686;  # https://github.com/scikit-learn/scikit-learn/issues/5534
							 | 
						
					
						
							
								
									
										
										
										
											2017-06-05 22:04:28 +01:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  src = fetchPypi {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    inherit pname version;
							 | 
						
					
						
							
								
									
										
										
										
											2019-04-16 19:15:40 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    sha256 = "c503802a81de18b8b4d40d069f5e363795ee44b1605f38bc104160ca3bfe2c41";
							 | 
						
					
						
							
								
									
										
										
										
											2017-06-05 22:04:28 +01:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  };
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2018-11-12 11:58:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  buildInputs = [ pillow gfortran glibcLocales ];
							 | 
						
					
						
							
								
									
										
										
										
											2017-06-05 22:04:28 +01:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  propagatedBuildInputs = [ numpy scipy numpy.blas ];
							 | 
						
					
						
							
								
									
										
										
										
											2018-11-12 11:58:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  checkInputs = [ pytest ];
							 | 
						
					
						
							
								
									
										
										
										
											2017-06-05 22:04:28 +01:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  LC_ALL="en_US.UTF-8";
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2018-11-13 12:59:20 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  doCheck = !stdenv.isAarch64;
							 | 
						
					
						
							
								
									
										
										
										
											2018-11-12 11:58:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  # Skip test_feature_importance_regression - does web fetch
							 | 
						
					
						
							
								
									
										
										
										
											2017-06-05 22:04:28 +01:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  checkPhase = ''
							 | 
						
					
						
							
								
									
										
										
										
											2018-11-12 11:58:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    cd $TMPDIR
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    HOME=$TMPDIR OMP_NUM_THREADS=1 pytest -k "not test_feature_importance_regression" --pyargs sklearn
							 | 
						
					
						
							
								
									
										
										
										
											2017-06-05 22:04:28 +01:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  '';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  meta = with stdenv.lib; {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    description = "A set of python modules for machine learning and data mining";
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    homepage = http://scikit-learn.org;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    license = licenses.bsd3;
							 | 
						
					
						
							
								
									
										
										
										
											2018-07-26 13:58:58 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    maintainers = with maintainers; [ ];
							 | 
						
					
						
							
								
									
										
										
										
											2017-06-05 22:04:28 +01:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  };
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 |