[Matrix-SIG] Syntactic sugar for constructing arrays

Yoon, Hoon (CICG - NY Program Trading) HYoon@exchange.ml.com
Mon, 12 Oct 1998 09:13:16 -0400


Hi,

  I think there was a long discussion on a very similar issue proposed by
David Ascher. Please read that. You should get a clearer picture of Konrad's
point. Look in David's Starship site and look for keywords in News Archive.
  Hack, I love to see:
A'  (transpose)
A .* B (dotproduct)
A > B (greater(A,B))
A^2    (A**2)
A[ [1,2,13], [2,9] ] = NA
dataframes (Splus)
standard NA (msg values)
  This will make Python on par with Gauss, Splus, Mathlab, etc...
The reason I am trying to do more on Python is still because the data
manipulation (which is about 70%+ of my work) is much much easier on Python.
I can put many things in production without using bulky Stat packages and
still have speed on C on matricies. So, I am happy enough.

Hoon,
> -----Original Message-----
> From:	Konrad Hinsen 
> Sent:	Sunday, October 11, 1998 9:49 AM
> To:	cgw@pgt.com
> Cc:	matrix-sig@python.org
> Subject:	Re: [Matrix-SIG] Syntactic sugar for constructing arrays
> 
> > Since the array is such a useful type, I'd like to see a
> > cleaner-looking syntax for creating array objects.  I'd like to be
> > able to write, for instance,
> > 
> > center = <256,256>
> > point =  <10,-20>
> > 
> > What do people think of this suggestion?
> 
> I'd like it too, but the only relevant opinion when it comes to 
> syntax issues in Python is Guido's ;-)
> 
> Moreover, with the current state of Python and NumPy this would be
> impossible to implement. The interpreter would have to recognize
> the syntax and create the array object - but the array type is defined
> in an extension that most Python users don't even have!
> -- 
> --------------------------------------------------------------------------
> -----
> Konrad Hinsen                            | E-Mail: hinsen@cnrs-orleans.fr
> Centre de Biophysique Moleculaire (CNRS) | Tel.: +33-2.38.25.55.69
> Rue Charles Sadron                       | Fax:  +33-2.38.63.15.17
> 45071 Orleans Cedex 2                    | Deutsch/Esperanto/English/
> France                                   | Nederlands/Francais
> --------------------------------------------------------------------------
> -----
> 
> _______________________________________________
> Matrix-SIG maillist  -  Matrix-SIG@python.org
> http://www.python.org/mailman/listinfo/matrix-sig