[Jnumerical-general] A forwarded message
Status: Beta
Brought to you by:
lemire
From: Jingzhao Ou <jin...@sb...> - 2003-06-10 15:17:16
|
Great. Since you plan to do some hacking, allow me to comment as to where the community should take JNumeric. The next step in JNumeric is to actually work backward. Initially, JNumeric was implemented as all-Java project. This proves to be counterproductive in practice. Indeed, if you look at Python Numeric, most of the implementation is done in Python with a few C calls. That's how JNumeric should work: mostly in Python with very few Java calls. Ideally, we should share nearly the same Python code with Python Numeric. This way, we would have far fewer lines of Java code to maintain and we would immediately get most missing features from Python Numeric. In fact, if you study the code, most of the serious things we are missing are the linear algebra routines. However, there are many good librairies in java to do linear algebra, so it isn't hard to implement these missing features. (Alas, I don't do any linear algebra these days, so I'm not a good candidate to implement those.) So, basically, here's what I suggest: if you need to extend or fix JNumeric, please try to do as much as possible in Python. It was a mistake to do too much in Java. -D >Dear Dr. Lemire, > >Thanks a lot for your prompt response. Let me make myself more clear. > >First, I am now using the CVS version of Jython on my Windows XP >machine. When I type "jython" on my Cygwin, it displays the following: > >$ jython >Jython 2.1+ on java1.4.1_02 (JIT: null) >Type "copyright", "credits" or "license" for more information. >>>> > >After I installed jNumeric, I tested it using the following and every thing is fine. > >>>> import Numeric >>>> Numeric.pi >3.141592653589793 >>>> a = Numeric.ones(23) >>>> a >array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, >1, 1]) >>>> Numeric.sum(a) >23 > >When I look at the source code of jNumeric, I can see the following > >public class JNumeric implements InitModule { > > public void initModule(PyObject dict) { > > // import modules > dict.__setitem__("umath", PyJavaClass.lookup(Umath.class)); > dict.__setitem__("FFT", PyJavaClass.lookup(JN_FFT.class)); > >...... > >However, if you go to http://www.jython.org/docs/javadoc/, you can see >the following > >=================================================================== >public interface InitModule >An deprecated interface that can be used if a java class want control >over the class dict initialization. > >This class is deprecated. See ClassDictInit for a replacement. >=================================================================== > >When I looked at the source code of the CVS version of Jython, I can >see that they are actually using ClassDictInit already. > >=================================================================== >public class PyList extends PySequence implements ClassDictInit { > public static void classDictInit(PyObject dict) { > PySequence.classDictInit(dict); >=================================================================== > >So, I am not sure whether jNumeric should reflect such changes or not. Would you please give me some guidance on this? Thanks! > >I have been using Python for quite some time. Recently, I become very interested in Jython and jNumeric. Especially, I hope that I can do some thing for jNumeric. > >I am a Ph.D. student at University of Southern California, Los Angeles, USA. I am now working on some beamforming algorithms used in wireless systems and their implementation using FPGAs. I hope that I can enhance jNumeric a little bit with regard to what I am doing right now. > >I am pouring over the source code of both Jython and jNumeric. Hopeful that I make my contribution to jNumeric soon. > >Have a nice day! > >Best regards, >Jingzhao > >----- Original Message ----- >From: Daniel Lemire <le...@on...> >Date: Monday, June 9, 2003 11:58 am >Subject: Re: About the status of jNumeric > >> Not sure what you mean. I've been using Jython 2.1 with JNumeric for >> a couple of years now with no problem. Just went to the Jython web >> site, and that's still the current version. >> >> If you found a deprecated feature and wish to help us keep JNumeric >> current, I'd gladly create a developer's account for you. >> >> >> -- >> Daniel Lemire, Ph.D. >> Research Officer, National Research Council of Canada >> Adjunct Professor, University of New Brunswick >> http://www.ondelette.com/acadia/ > > > |