From: Konrad H. <hi...@cn...> - 2003-01-26 11:10:14
|
ba...@ph... writes: > I just wondered if there is a "nicer" way of generating > a complex diagonal matrix than > a) > v=arange(10,typecode=Complex) > mat=diag(v) > b) > v=arange(10) > mat=diag(v)+0j > > Namely, wouldn't something like > v=arange(10) > mat=diag(v,typecode=Complex) > be nicer? Why would that be nicer? Personally, I prefer to have explicit typecodes limited to a very small number of array generators, and have all other functions apply the standard type-preservation rules. Konrad. -- ------------------------------------------------------------------------------- Konrad Hinsen | E-Mail: hi...@cn... 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 ------------------------------------------------------------------------------- |