PG84, GP40, GP41 need special treatment for arrays in plpython
Use class instead of a function so that

the times of select version is minimized
GP4.0 needs more care:

* ARRAY_AGG is not available

* UPDATE does not support data transfer between two segments, so the
  table must have the same distribution key as the one that is used to
  created it.
Fixed GP4.0 update problem

The best way: simply avoid using update

New problem: cannot create a table from an array
Fixed another GP40 problem:

create table tt as
select coef from madlib.logregr(...);

does not work. So use python as a intermediate step to store the coef
result as a string coefs and then

create table tt as select coefs as coef;