Discussion:
[Open Babel] Is it possible to support numpy arrays in the python module?
Davide Olianas
2017-06-16 12:26:13 UTC
Permalink
Hello,

I was reading the wiki page for python and in the last part
<http://openbabel.org/docs/current/UseTheLibrary/PythonDoc.html> it
states that a conversion to python built-in floats is required. Would it
be possible to avoid this conversion? Could somebody explain if adding
the code to handle numpy arrays is complicated or not?

Thanks for any info in advance,
Davide
Noel O'Boyle
2017-06-16 12:59:28 UTC
Permalink
Actually, it says that it *may* be supported, and an example is shown.

A numpy array is a C/C++ array, and is supported by Open Babel
natively as it is a C/C++ toolkit. However, as C++ is a typed
language, and if the correct type is not passed in, it doesn't work.

- Noel
Post by Davide Olianas
Hello,
I was reading the wiki page for python and in the last part it states that a
conversion to python built-in floats is required. Would it be possible to
avoid this conversion? Could somebody explain if adding the code to handle
numpy arrays is complicated or not?
Thanks for any info in advance,
Davide
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
OpenBabel-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Loading...