Code Monkey home page Code Monkey logo

Comments (5)

sfomel avatar sfomel commented on July 26, 2024

Logged In: YES
user_id=801437

Follow the guidelines in

http://www.scipy.org/Converting_from_numarray?highlight=%28numarray%29

and change filt/lib/rsf.i

Original comment by: sfomel

from src.

sfomel avatar sfomel commented on July 26, 2024

Logged In: YES
user_id=1548166

There is also /filt/lib/rsf.py to change, but that is
quite simple – just replace automatically all instances of
the ‘numarray’ string with ‘numpy’ in any text editor.

Original comment by: nickvlad

from src.

sfomel avatar sfomel commented on July 26, 2024

Logged In: YES
user_id=1548166

I found out today that Python 2.5 (now available as beta
3) will include the ctypes module! So they will become the
recommended method for calling C. I read about ctypes in
Oliphant’s book (great resource on this topic). Apparently
there is no need for wrappers! Just import the ctypes
module and call the functions. The python layer mentioned
by Oliphant is if you want bounds-checking safety and the
like. It is what rsf.py provides to the c_rsf module
anyway. Ctypes was created especially for calling large
existing shared libraries from Python without a wrapper.
Numpy works well with it too. I will try to look into
redoing the API with ctypes, but: (1) my fiancee comes
tomorrow; (2) the wedding is in 2 weeks (3) after that I
have to move to another apartment and (4) I do not trust
my Python abilities very much. So I do not dare to even
ask to be assigned to this. I’ll see what I can do, but I
cannot promise anything.
Nick

Original comment by: nickvlad

from src.

sfomel avatar sfomel commented on July 26, 2024

Logged In: YES
user_id=801437

After converting to numpy, add a Python example to
http://rsf.sourceforge.net/wiki/index.php/Demo

Original comment by: sfomel

from src.

sfomel avatar sfomel commented on July 26, 2024

Logged In: YES
user_id=1541111

With the much appreciated help of Darren Thomson, we updated the API Python
from numarray to numpy. Note that if you have ONLY numarray, the API Python
will use numarray but if you have both numarray and numpy, or only numpy, API
Python uses numpy.

I also updated the Python example on the wiki.

Original comment by: hegilles

from src.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.