James Boyle wrote:
> I have some codes which require a Numeric array and others which 
> require a numpy array.
> I have no control over either code, and not the time to convert all to 
> numpy if I did.
> The problem is this - say I have a routine that returns a numpy array 
> as a result and I wish to do something to this array using a code that 
> uses Numeric.  Just passing the numpy array to the numeric code does 
> not work. In my case the Numeric code thinks that the numpy float is a 
> long int, this is not good. So what does one do in the interim? There 
> are some legacy codes which will never be converted to numpy.
> 
> I have seen discussion as to how to convert Numeric -> numpy, but not 
> how the two can play together. I can appreciate the strong desire to 
> eliminate having two systems, but the practical aspects of getting 
> things done must also be considered.
> 
> I am using numpy 1.0b1 and Numeric 23.7 .

Upgrade to Numeric 24.2 and use Numeric.asarray(numpy_array) and 
numpy.asarray(numeric_array) at the interfaces between your codes.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco


-------------------------------------------------------------------------
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