Is it possible to support numpy arrays in the python module?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Is it possible to support numpy arrays in the python module?

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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Is it possible to support numpy arrays in the python module?

Noel O'Boyle
Administrator
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

On 16 June 2017 at 13:26, Davide Olianas <[hidden email]> wrote:

> 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
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Loading...