Hi list, I have this problem str(numpy.inf) under linux give 'inf' str(numpy.inf) under win32 give '1.#INF' It is a problem for me because with a GUI in LineEdit, for example, the end user who have to enter a float can enter inf under linux but not under win32. Any idea to solve this ? Thanks a lot. Sam -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Samuel Garcia Universite Claude Bernard LYON 1 CNRS - UMR5020, Laboratoire des Neurosciences et Systemes Sensoriels 50, avenue Tony Garnier 69366 LYON Cedex 07 FRANCE Tél : 04 37 28 74 64 Fax : 04 37 28 76 01 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Samuel GARCIA wrote:
Hi list,
I have this problem str(numpy.inf) under linux give 'inf' str(numpy.inf) under win32 give '1.#INF'
It is a problem for me because with a GUI in LineEdit, for example, the end user who have to enter a float can enter inf under linux but not under win32.
Any idea to solve this ?
No. We (and Python) defer to the C library for such things, and they each use different representations. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco
bad luck, I will write a patch in my GUI to detect the platform and detect inf -inf and nan in lineditbox. If any anyone have a suggestion, thank you because dealing with platform specificities is boring. thank you sam Robert Kern wrote:
Samuel GARCIA wrote:
Hi list,
I have this problem str(numpy.inf) under linux give 'inf' str(numpy.inf) under win32 give '1.#INF'
It is a problem for me because with a GUI in LineEdit, for example, the end user who have to enter a float can enter inf under linux but not under win32.
Any idea to solve this ?
No. We (and Python) defer to the C library for such things, and they each use different representations.
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Samuel Garcia Universite Claude Bernard LYON 1 CNRS - UMR5020, Laboratoire des Neurosciences et Systemes Sensoriels 50, avenue Tony Garnier 69366 LYON Cedex 07 FRANCE Tél : 04 37 28 74 64 Fax : 04 37 28 76 01 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Because of that I also have problem with pickle when I want to store a float which is not finite. Am I the first with this problem under win32 ? Sam Robert Kern wrote:
Samuel GARCIA wrote:
Hi list,
I have this problem str(numpy.inf) under linux give 'inf' str(numpy.inf) under win32 give '1.#INF'
It is a problem for me because with a GUI in LineEdit, for example, the end user who have to enter a float can enter inf under linux but not under win32.
Any idea to solve this ?
No. We (and Python) defer to the C library for such things, and they each use different representations.
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Samuel Garcia Universite Claude Bernard LYON 1 CNRS - UMR5020, Laboratoire des Neurosciences et Systemes Sensoriels 50, avenue Tony Garnier 69366 LYON Cedex 07 FRANCE Tél : 04 37 28 74 64 Fax : 04 37 28 76 01 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
participants (2)
-
Robert Kern -
Samuel GARCIA