[Numpy-discussion] import overhead of numpy.testing
Sun Aug 11 22:27:40 CDT 2013
On Aug 11, 2013 4:37 PM, "Andrew Dalke" <firstname.lastname@example.org> 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
> The problem is the existing code out there which does:
> import numpy as np
> np.testing.utils.assert_almost_equal(x, y)
> (That is, without an additional import), and other code which does
> from numpy.testing import *
I wouldn't consider having then both emit a warning. The latter one is an
explicit import (albeit horrible). Iirc, that should import the testing.py,
and deactivate the warnings.
However, "from numpy import testing" would be a problem... Drat...
Forget I said anything. The idea wouldn't work.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion