> There is no way to know how many dimensions the function expects to get
> back. (float[][] doesn't actually mean anything.) So when converting
> the return value back to SQL, you'd have to guess, is the first element
> convertible to float (how do you know?), if not, does it support the
> sequ
On Wed, Aug 14, 2013 at 9:34 PM, Peter Eisentraut wrote:
> On Tue, 2013-08-13 at 14:30 -0700, Josh Berkus wrote:
>> Currently PL/python has 1 dimension hardcoded for returning arrays:
>>
>> create or replace function nparr ()
>> returns float[][]
>> language plpythonu
>> as $f$
>> from numpy impor
On Tue, 2013-08-13 at 14:30 -0700, Josh Berkus wrote:
> Currently PL/python has 1 dimension hardcoded for returning arrays:
>
> create or replace function nparr ()
> returns float[][]
> language plpythonu
> as $f$
> from numpy import array
> x = ((1.0,2.0),(3.0,4.0),(5.0,6.0),)
> return x
> $f$;
All,
Currently PL/python has 1 dimension hardcoded for returning arrays:
create or replace function nparr ()
returns float[][]
language plpythonu
as $f$
from numpy import array
x = ((1.0,2.0),(3.0,4.0),(5.0,6.0),)
return x
$f$;
josh=# select nparr()
;
ERROR: invalid input syntax for type double