lebedov/scikits.cuda — pull request #91 by Eric89GXL (2014-12-10 23:23:50+00:00)
Title: FIX: Nest import to avoid unnecessary cublas import

So far in my code I only use `from scikits.cuda import fft`. On `master` this actually forces an import of `scikits.cuda.cublas` as well, because `.fft` looks for `.misc`, which in turn imports `.cublas`. This is a problem for me, because when importing `cublas` I get a warning about creating a context -- and it's also a bit inefficient in terms of importing to have to go through these steps to get FFT use.

This fixes the issue by nesting the import of `.cublas` to the two places it's used. A more comprehensive solution might involve refactoring the code to make these bits of code (cublas, fft, and misc) more orthogonal if possible, but the current solution has the advantage of being very simple as only a +2/-1 change :)