The standard easy solution is to delay the violating import in the function/method where it is used.
Gaƫl On Thu, Feb 19, 2015 at 05:15:12PM +0400, Artem wrote: > Hello > While working on matrix factorization with missing values I faced a circular > import issue (https://travis-ci.org/scikit-learn/scikit-learn/jobs/50276638# > L1362). > The problem is that I want to add a new imputer, which should reside in > .preprocessing.imputation and use factorizer from decomposition. As you can > see > in Travis, this leads to circular import, so I should not import decomposition > in preprocessing. That means I need to move factorization somewhere. > So, the question is: where can I move it? The factorization core belongs to > decomposition (NMF is already there). I was thinking about the "root" (where > lda, qda, cross_validation and others are located), but not sure if polluting > it is a good idea. > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk > _______________________________________________ > Scikit-learn-general mailing list > Scikit-learn-general@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/scikit-learn-general -- Gael Varoquaux Researcher, INRIA Parietal Laboratoire de Neuro-Imagerie Assistee par Ordinateur NeuroSpin/CEA Saclay , Bat 145, 91191 Gif-sur-Yvette France Phone: ++ 33-1-69-08-79-68 http://gael-varoquaux.info http://twitter.com/GaelVaroquaux ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk _______________________________________________ Scikit-learn-general mailing list Scikit-learn-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/scikit-learn-general