[PYTHON MATRIX-SIG] [Q] Array->String conversion, how?
Konrad HINSEN
hinsenk@ere.umontreal.ca
Mon, 27 May 1996 19:51:37 -0400
> Speaking of which, isn't it odd that:
>
> >>> arange(10)
> 0 1 2 3 4 5 6 7 8 9
> >>> arange(10.0)
> 0 1 2 3 4 5 6 7 8 9
> >>> arange(0.0,10.0)
> 0.00000 1.00000 2.00000 3.00000 4.00000 5.00000 6.00000 7.00000 8.00000 9.00000
On my machine the last two give the same answer, as expected. If they
don't for you, I suspect rounding problems. Check if
arange(0.0,10.0)-arange(10.0)
really gives zeroes. If so, my printing code behaves funnily on your
machine. If not, arange() behaves funnily ;-)
-------------------------------------------------------------------------------
Konrad Hinsen | E-Mail: hinsenk@ere.umontreal.ca
Departement de chimie | Tel.: +1-514-343-6111 ext. 3953
Universite de Montreal | Fax: +1-514-343-7586
C.P. 6128, succ. Centre-Ville | Deutsch/Esperanto/English/Nederlands/
Montreal (QC) H3C 3J7 | Francais (phase experimentale)
-------------------------------------------------------------------------------
=================
MATRIX-SIG - SIG on Matrix Math for Python
send messages to: matrix-sig@python.org
administrivia to: matrix-sig-request@python.org
=================