On 6/28/06, Robert Kern <[EMAIL PROTECTED]> wrote:

> The Capitalized versions are actually old typecodes for backwards 
> compatibility
> with Numeric. In recent development versions of numpy, they are no longer
> exposed except through the numpy.oldnumeric compatibility module. A decision 
> was
> made for numpy to use the actual width of a type in its name instead of the
> width of its component parts (when it has parts).
>
> Code in scipy which still requires actual string typecodes is a bug. Please
> report such cases on the Trac:
>
>    http://projects.scipy.org/scipy/scipy

Well, an easy way to make all those poke their ugly heads in a hurry
would be to remove line 32 in scipy's init:

longs[Lib]> grep -n oldnum *py
__init__.py:31:import numpy.oldnumeric as _num
__init__.py:32:from numpy.oldnumeric import *


If we really want to push for the new api, I think it's fair to change
those two lines by simply

from numpy import oldnumeric

so that scipy also exposes oldnumeric, and let all deprecated names be
hidden there.

I just tried this change:

Index: __init__.py
===================================================================
--- __init__.py (revision 2012)
+++ __init__.py (working copy)
@@ -29,9 +29,8 @@

 # Import numpy symbols to scipy name space
 import numpy.oldnumeric as _num
-from numpy.oldnumeric import *
-del lib
-del linalg
+from numpy import oldnumeric
+
 __all__ += _num.__all__
 __doc__ += """
 Contents


and scipy's test suite still passes (modulo the test_cobyla thingie
Nils is currently fixing, which is not related to this).

Should I apply this patch, so we push the cleaned-up API even a bit harder?

Cheers,

f

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion

Reply via email to