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
It's a bug with PyGTK in that merely importing it sets the locale.
But more seriously, it's also a bug in Numpy, in that its string
formatting is dependent on locale (unlike standard floats in Python).
See this Numpy bug:
http://projects.scipy.org/scipy/numpy/ticket/902
*
*and this mailing list
Hi Ryan,
Ryan May wrote:
> Lionel Roubeyrie wrote:
>
>> 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) :
>> ##
>>
This seems to be a bug (or at least inconsistent behavior) in numpy when
the locale is set (which happens when gtk is imported -- replace 'import
pylab' with 'import gtk' and you'll see the same behavior).
We actually use a workaround for this in other parts of matplotlib,
which is:
for i in
Lionel Roubeyrie wrote:
> 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,
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
Typ