Re: [Numpy-discussion] import overhead of numpy.testing

2013-08-11 Thread Ralf Gommers
On Sun, Aug 11, 2013 at 3:35 AM, Benjamin Root ben.r...@ou.edu wrote: Would there be some sort of way to detect that numpy.testing wasn't explicitly imported and issue a deprecation warning? Say, move the code into numpy._testing, import in into the namespace as testing, but then have the

Re: [Numpy-discussion] import overhead of numpy.testing

2013-08-11 Thread Benjamin Root
On Aug 11, 2013 5:02 AM, Ralf Gommers ralf.gomm...@gmail.com wrote: On Sun, Aug 11, 2013 at 3:35 AM, Benjamin Root ben.r...@ou.edu wrote: Would there be some sort of way to detect that numpy.testing wasn't explicitly imported and issue a deprecation warning? Say, move the code into

Re: [Numpy-discussion] import overhead of numpy.testing

2013-08-11 Thread Andrew Dalke
On Aug 11, 2013, at 10:24 PM, Benjamin Root wrote: The idea would be that within numpy (and we should fix SciPy as well), we would always import numpy._testing as testing, and not import testing.py ourselves. The problem is the existing code out there which does: import numpy as np ...

Re: [Numpy-discussion] import overhead of numpy.testing

2013-08-11 Thread Charles R Harris
On Sun, Aug 11, 2013 at 2:24 PM, Benjamin Root ben.r...@ou.edu wrote: On Aug 11, 2013 5:02 AM, Ralf Gommers ralf.gomm...@gmail.com wrote: On Sun, Aug 11, 2013 at 3:35 AM, Benjamin Root ben.r...@ou.edu wrote: Would there be some sort of way to detect that numpy.testing wasn't

Re: [Numpy-discussion] import overhead of numpy.testing

2013-08-11 Thread Benjamin Root
On Aug 11, 2013 4:37 PM, Andrew Dalke da...@dalkescientific.com wrote: On Aug 11, 2013, at 10:24 PM, Benjamin Root wrote: The idea would be that within numpy (and we should fix SciPy as well), we would always import numpy._testing as testing, and not import testing.py ourselves. The problem

Re: [Numpy-discussion] import overhead of numpy.testing

2013-08-10 Thread Ralf Gommers
On Wed, Aug 7, 2013 at 3:26 PM, Andrew Dalke da...@dalkescientific.comwrote: On Aug 7, 2013, at 4:37 AM, Charles R Harris wrote: I haven't forgotten and intend to look at it before the next release. Thanks! On a related topic, last night I looked into deferring the import for

Re: [Numpy-discussion] import overhead of numpy.testing

2013-08-10 Thread Andrew Dalke
[Short version: It doesn't look like my proposal or any simple alternative is tenable.] On Aug 10, 2013, at 10:28 AM, Ralf Gommers wrote: It does break backwards compatibility though, because now you can do: import numpy as np np.testing.assert_equal(x, y) Yes, it does. I realize

Re: [Numpy-discussion] import overhead of numpy.testing

2013-08-10 Thread Ralf Gommers
On Sat, Aug 10, 2013 at 5:21 PM, Andrew Dalke da...@dalkescientific.comwrote: [Short version: It doesn't look like my proposal or any simple alternative is tenable.] On Aug 10, 2013, at 10:28 AM, Ralf Gommers wrote: It does break backwards compatibility though, because now you can do:

Re: [Numpy-discussion] import overhead of numpy.testing

2013-08-10 Thread Benjamin Root
On Aug 10, 2013 12:50 PM, Ralf Gommers ralf.gomm...@gmail.com wrote: On Sat, Aug 10, 2013 at 5:21 PM, Andrew Dalke da...@dalkescientific.com wrote: [Short version: It doesn't look like my proposal or any simple alternative is tenable.] On Aug 10, 2013, at 10:28 AM, Ralf Gommers wrote:

[Numpy-discussion] import overhead of numpy.testing

2013-08-07 Thread Andrew Dalke
On Aug 7, 2013, at 4:37 AM, Charles R Harris wrote: I haven't forgotten and intend to look at it before the next release. Thanks! On a related topic, last night I looked into deferring the import for numpy.testing. This is the only other big place where numpy's import overhead might be reduced