[Numpy-discussion] simple array help?

Konrad Hinsen hinsen at cnrs-orleans.fr
Tue Oct 17 15:27:22 CDT 2000


> i have a simple array with floating values
> >>> print a
> array([ 0. ,  0.2,  0.4,  0.6,  0.8])

There are probably many solutions, my preferred one is

  repeat(a[:, NewAxis], [3], 1)

Konrad.
--
-------------------------------------------------------------------------------
Konrad Hinsen                            | E-Mail: hinsen at cnrs-orleans.fr
Centre de Biophysique Moleculaire (CNRS) | Tel.: +33-2.38.25.56.24
Rue Charles Sadron                       | Fax:  +33-2.38.63.15.17
45071 Orleans Cedex 2                    | Deutsch/Esperanto/English/
France                                   | Nederlands/Francais
-------------------------------------------------------------------------------



More information about the Numpy-discussion mailing list