Path: csiph.com!usenet.pasdenom.info!news.redatomik.org!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.005 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'friday,': 0.09; 'from:addr:ethan': 0.09; 'from:addr:stoneleaf.us': 0.09; 'from:name:ethan furman': 0.09; 'message-id:@stoneleaf.us': 0.09; 'thats': 0.09; '~ethan~': 0.09; 'def': 0.12; 'filename:fname piece:signature': 0.16; 'ok...': 0.16; 'tweak': 0.16; 'y):': 0.16; 'exception': 0.16; 'wrote:': 0.18; 'example': 0.22; 'saying': 0.22; 'header:User-Agent:1': 0.23; 'least': 0.26; 'values': 0.27; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; "d'aprano": 0.31; 'steven': 0.31; 'lists': 0.32; 'there,': 0.34; 'maybe': 0.34; 'subject: (': 0.35; 'test': 0.35; 'charset:us-ascii': 0.36; 'subject:?': 0.36; 'should': 0.36; 'too': 0.37; 'skip:[ 10': 0.38; 'to:addr:python-list': 0.38; 'little': 0.38; 'sure': 0.39; 'to:addr:python.org': 0.39; 'how': 0.40; 'march': 0.61; 'received:173': 0.61; 'more': 0.64; '2015': 0.84 Date: Fri, 06 Mar 2015 10:16:10 -0800 From: Ethan Furman User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Is nan in (nan,) correct? References: <87443f8f-3bd8-4b88-84c1-d20a2fc8cc19@googlegroups.com> <54f9dcdc$0$12987$c3e8da3$5496439d@news.astraweb.com> <6a78957e-d850-4189-923a-fa779a6a9463@googlegroups.com> In-Reply-To: <6a78957e-d850-4189-923a-fa779a6a9463@googlegroups.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="EVOGwhn30G9jj7uWR69hruKhm9wTfKPsD" X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.19 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 65 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1425665810 news.xs4all.nl 2883 [2001:888:2000:d::a6]:53034 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:87052 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --EVOGwhn30G9jj7uWR69hruKhm9wTfKPsD Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable On 03/06/2015 10:04 AM, Rustom Mody wrote: > On Friday, March 6, 2015 at 10:29:19 PM UTC+5:30, Steven D'Aprano wrote= : >> def inverse(x): >> return 1.0/x >> >> There's an exception there, waiting to bite. If I include inverse() in= some >> complex calculation: >> >> def function(x, y): >> return atan2(inverse(3*x*y)+1, inverse(1 - x**2 + 3*x - 0.2)**3) >> >> values =3D [function(1.5*x, y+2) for x, y in zip(xx, yy)] > Ok... Maybe so > As I said I am not too sure about this >=20 > However you have to give me a little fuller (if not more realistic) exa= mple > [Your xx and yy are what?] xx and yy are lists of floats, and for your test xx should have at least = one zero in it. > And I have to see if I know how to tweak it nan-less > And at least maintain hopefully improve the clarity, succinctness of th= e original! Not saying I will be able -- just that thats the claim Good luck. :) -- ~Ethan~ --EVOGwhn30G9jj7uWR69hruKhm9wTfKPsD Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAEBAgAGBQJU+e7tAAoJENZ7D1rrH75NlfkP/2ZpZvbo5t6JjzpgHRwjXG4H aXpEaNskVxT+sV+TpSJVVPavXK/bh3l6364Ev//LWBzTK+NQw0dhIaRjceZQ5buy MfL40oMvCYaorUIwWygrFvW/J/TMDlJupj/oR6xDGDyBoHKvwqcO3MVG+v97psyw ozG+XQlCCYGcIb/DCCXxp9iKEgYNuYIE7DZ4iqJB3Kw5gofgC2gWwsmul6oezybW 3p67zbnXuzoIcRy41+jqIYasv4qYpkwi7BxSaVQslhBazVB3X0Cjrm+kWM1oleiV lYwnvt2OEVfS749hLRxTpH5ZsQgU6YDUJZtIsMsbua1TjaZ+bNr1cSL2sDv4Cbuj CA8QK1vidhTwv6DfaOFj2QudcmQnMCZtFzJVJPUDBcW/8siEIyndD4htc3SKX6/p EACVOij7eIMe8QXUuNpVWz+QsESRCOacCQVaPZcd7krEzAt1NTBmEccngzlbkzU0 DEDfjjb9HAXWSmch5IprBR5grAJ+4Yz4ONfnSpEcRHYEOvAm7DR4sgcqz94pLmL7 H3tvCuBSw5YFBgMqNsi8hKIJAvM4Xkx+Jb/qATPu7VbEiIVnDKy+jXhmYp8rqYw5 IYhOPT6UvAohVhi0RokXUETN7FqmGCNiNTaYgLNmK95eQwNEwN96hZNCeCfDnwEf EruzjcQWopNdGdh48q71 =boVV -----END PGP SIGNATURE----- --EVOGwhn30G9jj7uWR69hruKhm9wTfKPsD--