[SciPy-user] python (against java) advocacy for scientific projects

Almar Klein almar.klein@gmail....
Tue Jan 20 03:05:27 CST 2009

For what its worth,

I've once tried to do scientific programming in C#. I know, it's not Java,
but I guess its similar to some extend when compared to Python.

In scientific projects, there is usually a lot of prototyping and quick
scripts. That makes it that an interpreted language is much more usefull
than a compiled language. That's one of the reasons why Matlab is so
suitable for scientific programming, or better yet: Python!


2009/1/19 Sturla Molden <sturla@molden.no>

> > 2009/1/19 Sturla Molden <sturla@molden.no>:
> > And data must be copied between the JVM and the C code.
> No, you can get a pointer to the raw data:
> JNIEXPORT void JNICALL Java_ArrayExample_manipulateArray
> (JNIEnv *env, jdoubleArray array)
> {
>   jdouble *data = (*env)->GetDoubleArrayElements(env, array, 0);
>   jlen len = (*env)->GetArrayLength(env, array);
>   foobar(data, &len); /* call Fortran */
>   (*env)->ReleaseDoubleArrayElements(env, array, Data, 0);
> }
> But if you simulate a 2D array with an array of arrays, it will not be a
> contiguous region and you possibly have to copy the data (or fake it
> similary in C with a pointer of an array of pointers, cf. Numerical
> Receipes).
> Sturla Molden
> _______________________________________________
> SciPy-user mailing list
> SciPy-user@scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/scipy-user/attachments/20090120/3289c266/attachment.html 

More information about the SciPy-user mailing list