[SciPy-user] python (against java) advocacy for scientific projects
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 <firstname.lastname@example.org>
> > 2009/1/19 Sturla Molden <email@example.com>:
> > 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
> Sturla Molden
> SciPy-user mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-user