[Numpy-discussion] c-api return two arrays

Yoshi Rokuko yoshi at rokuko.net
Fri Jul 29 14:32:13 EDT 2011


+-------------------------- Pauli Virtanen -----------+
> Fri, 29 Jul 2011 10:52:12 +0200, Yoshi Rokuko wrote:
> [clip]
> >>>> A, B = mod.meth(C, prob=.95)
> > 
> > is it possible to return two arrays?
> 
> The way to do this in Python is to build a tuple with 
> Py_BuildValue("OO", A, B) and return that.

that seems to be it, thank you!



More information about the NumPy-Discussion mailing list