[Numpy-discussion] Extending C with Python

Jialin Liu jalnliu at lbl.gov
Tue Feb 6 13:40:12 EST 2018


With PyObject_CallMethod(pInstance, method_name, "O", py_dims);

Can I pass in a reference and modify its content in python?

Best,
Jialin

On Sat, Feb 3, 2018 at 10:29 AM, Jialin Liu <jalnliu at lbl.gov> wrote:

> Thank you guys.
>
> Best,
> Jialin
>
> Sent from my iPhone
>
> On Feb 3, 2018, at 8:11 AM, Sylvain Corlay <sylvain.corlay at gmail.com>
> wrote:
>
> You can also check out pybind11, xtensor, and xtensor-python
>
> The latter enables a high-level numpy-like API on the C++ side.
>
> You can check out the numpy to xtensor cheat sheet:
>
> http://xtensor.readthedocs.io/en/latest/numpy.html
>
> Best,
>
> Sylvain
>
>
> On Thu, Feb 1, 2018 at 12:11 AM, Stefan Seefeld <stefan at seefeld.name>
> wrote:
>
>> On 31.01.2018 17:58, Chris Barker wrote:
>>
>> I'm guessing you could use Cython to make this easier.
>>
>>
>> ... or Boost.Python (http://boostorg.github.io/python), which has
>> built-in support for NumPy (http://boostorg.github.io/pyt
>> hon/doc/html/numpy/index.html), and supports both directions: extending
>> Python with C++, as well as embedding Python into C++ applications.
>>
>>
>> <signature.png>
>>
>> --
>>
>>       ...ich hab' noch einen Koffer in Berlin...
>>
>>
>>
>> _______________________________________________
>> NumPy-Discussion mailing list
>> NumPy-Discussion at python.org
>> https://mail.python.org/mailman/listinfo/numpy-discussion
>>
>>
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at python.org
> https://mail.python.org/mailman/listinfo/numpy-discussion
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20180206/96fd308b/attachment.html>


More information about the NumPy-Discussion mailing list