> hongy... wrote .... > > This method doesn't work, as shown below: > ? b .... > > [0.0, -1.0, 0.0, 0.25] > [1.0, 0.0, 0.0, 0.25] > [0.0, 0.0, 1.0, 0.25] > [0.0, 0.0, 0.0, 1.0] > > a .... > > 0 0 0 1 > # ----------------------------------- Using .... debian 11.3 bullseye python 3.9 numpy 1,21,5 Code as I posted in my reply dated 2022-05-18 $ python3 np_array_to_fractions_2.py b .... [0.0, -1.0, 0.0, 0.25] [1.0, 0.0, 0.0, 0.25] [0.0, 0.0, 1.0, 0.25] [0.0, 0.0, 0.0, 1.0] a .... 0 -1 0 1/4 1 0 0 1/4 0 0 1 1/4 0 0 0 1 -- Stanley C. Kitching Human Being Phoenix, Arizona -- https://mail.python.org/mailman/listinfo/python-list
- Re: Convert the decimal numbers expressed in a `nu... hongy...@gmail.com
- Re: Convert the decimal numbers expressed in a `numpy.n... hongy...@gmail.com
- Re: Convert the decimal numbers expressed in a `nu... Dennis Lee Bieber
- Re: Convert the decimal numbers expressed in a... hongy...@gmail.com
- Re: Convert the decimal numbers expressed in a... Peter J. Holzer
- Re: Convert the decimal numbers expressed ... MRAB
- Re: Convert the decimal numbers expres... Dennis Lee Bieber
- Re: Convert the decimal numbers expressed in a `nu... Barry
- Re: Convert the decimal numbers expressed in a `numpy.n... Cousin Stanley
- Re: Convert the decimal numbers expressed in a `nu... hongy...@gmail.com
- Re: Convert the decimal numbers expressed in a... Cousin Stanley