Thanks for your responses,
Looking comments in the tickets, putting
import locale
locale.setlocale(locale.LC_NUMERIC, 'C')
after the pylab import resolves the problem (but not the bug...).
Have a happy new year
Le lundi 05 janvier 2009 à 15:37 +0100, Lionel Roubeyrie a écrit :
> Hi all,
> Trying to write to text files some plotted datas, we have a strange
> behavour on masked arrays after importing pylab, with the dot decimal
> separator replaced by a comma (but not all) :
> ##############################
> Python 2.5.2 (r252:60911, Oct 5 2008, 19:24:49)
> [GCC 4.3.2] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import numpy as np
> >>> a=np.ma.array([1., 1.01, 2.11, 3.61])
> >>> for i in a:str(i)
> ...
> '1.0'
> '1.01'
> '2.11'
> '3.61'
> >>> import matplotlib
> >>> for i in a:str(i)
> ...
> '1.0'
> '1.01'
> '2.11'
> '3.61'
> >>> import pylab
> >>> for i in a:str(i)
> ...
> '1.0'
> '1,01'
> '2,11'
> '3,61'
> >>> np.__version__, matplotlib.__version__
> ('1.2.1', '0.98.3')
> #############################
>
> Any help welcomes!
>
--
Lionel Roubeyrie
chargé d'études
LIMAIR - La Surveillance de l'Air en Limousin
http://www.limair.asso.fr
------------------------------------------------------------------------------
_______________________________________________
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users