Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #17673

Re: Elementwise -//- first release -//- Element-wise (vectorized) function, method and operator support for iterables in python.

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!feed.xsnews.nl!border-1.ams.xsnews.nl!xlned.com!feeder7.xlned.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <nathan.alexander.rice@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'bug': 0.02; 'skip': 0.04; 'unexpected': 0.07; '21,': 0.09; '[1]:': 0.09; '[2]:': 0.09; '[3]:': 0.09; 'subject:method': 0.09; 'error:': 0.10; 'am,': 0.12; 'classes,': 0.13; 'tries': 0.15; '0))': 0.16; 'anyhow,': 0.16; 'kern': 0.16; 'old-style': 0.16; 'passed.': 0.16; 'subject:function': 0.16; 'subject:python.': 0.16; 'subject:release': 0.16; 'wed,': 0.17; 'wrote:': 0.18; '>>>': 0.18; 'instance': 0.18; 'occurred': 0.18; 'input': 0.22; 'dec': 0.22; "doesn't": 0.22; 'header:In-Reply-To:1': 0.22; 'fine': 0.24; 'traceback': 0.24; 'tests': 0.25; 'code': 0.25; 'import': 0.27; 'invalid': 0.28; 'message-id:@mail.gmail.com': 0.28; "skip:' 10": 0.29; 'problem': 0.29; 'error': 0.29; 'pm,': 0.29; 'subject:support': 0.30; 'thanks': 0.31; 'returning': 0.32; 'instead': 0.33; 'received:209.85.160': 0.33; 'to:addr:python- list': 0.34; 'probably': 0.34; 'received:209.85.160.46': 0.35; 'received:mail-pw0-f46.google.com': 0.35; '(by': 0.37; 'awesome': 0.37; 'checks': 0.37; 'class.': 0.37; 'to:name:python-list': 0.37; 'but': 0.37; 'corner': 0.37; 'received:google.com': 0.37; 'problems': 0.37; 'skip:_ 10': 0.37; 'doing': 0.38; 'using': 0.38; 'received:209.85': 0.38; 'first.': 0.39; 'should': 0.39; 'subject: (': 0.40; 'received:209': 0.40; 'to:addr:python.org': 0.40; 'type': 0.61; '2011': 0.61; 'order': 0.62; 'love': 0.62; 'here': 0.65; '11:29': 0.84; 'corrupted': 0.84; 'nathan': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=cP0kz/8LVvnqD9cyZ1JccIzL38OJD+9waWUIPGZAqVE=; b=vRkEEuzCYHn7i0at/Uj7/lI/hIEDqlJWvbYCL+ZUk7EnFVX6kL++Eol9RLaXDDZoOJ J2tWYYXSeUCKM+RvlVCW8s/KhUVlOhbQVlNZXnypAaaynuZJOJGGC7Tejvkzf40u1DPx BiOb3T3YHLf+rLe/QpKGYpzzVGhG/ZkmCkNhs=
MIME-Version 1.0
In-Reply-To <jct1he$q85$1@dough.gmane.org>
References <CAOFbRmLyw88pHNSdszQY672ukAcm965jDUamXQGOFXoX9pd3+Q@mail.gmail.com> <CALwzidkOYp8FzfQ-s4wiNHy4TW3R03Cq7qQDSSNV=Zcf1OgQkA@mail.gmail.com> <mailman.3890.1324427093.27778.python-list@python.org> <b7f6acbd-f4c8-4910-971b-a6d897b30484@f8g2000prm.googlegroups.com> <CAOFbRm+BnPL9u=E_DdsQ37WqnHjQXnVeGBwKvEc+3NooFrSy7w@mail.gmail.com> <jct1he$q85$1@dough.gmane.org>
Date Wed, 21 Dec 2011 11:43:49 -0500
Subject Re: Elementwise -//- first release -//- Element-wise (vectorized) function, method and operator support for iterables in python.
From Nathan Rice <nathan.alexander.rice@gmail.com>
To python-list <python-list@python.org>
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding quoted-printable
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.3919.1324485833.27778.python-list@python.org> (permalink)
Lines 37
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1324485833 news.xs4all.nl 6954 [2001:888:2000:d::a6]:42461
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:17673

Show key headers only | View raw


On Wed, Dec 21, 2011 at 11:29 AM, Robert Kern <robert.kern@gmail.com> wrote:
> On 12/21/11 3:15 PM, Nathan Rice wrote:
>
>>> Incidentally, displaying an ElementwiseProxy instance doesn't go down
>>> well with iPython:
>>>
>>> In [1]: from elementwise import *
>>>
>>> In [2]: e = ElementwiseProxy(['one','two','three'])
>>>
>>> In [3]: e
>>> Out[3]: ERROR: An unexpected error occurred while tokenizing input
>>> The following traceback may be corrupted or invalid
>>> The error message is: ('EOF in multi-line statement', (6, 0))
>>
>>
>> I love IPython, but it has had known problems with iterators for
>> years.  A long time ago, I agonized over what I thought was a bug in
>> my code where itertools.count would skip numbers in IPython, but my
>> unit tests all passed.  Everything should work fine if you tuple() it
>> first.
>
>
> This is a different problem, actually. The problem is that the recently
> added (by me, actually) pretty-printing system tries to dispatch based on
> the type. In order to handle old-style classes, it checks for the type using
> .__class__ first. ElementProxy's __getattribute__() gets in the way here by
> returning a generator instead of the ElementProxy class.

Thanks for the heads up Robert.  Given that IPython is awesome and
people should probably be doing an '.apply(type)' in that instance
anyhow, I will corner case that on __getattribute__.

Nathan

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: Elementwise -//- first release -//- Element-wise (vectorized) function, method and operator support for iterables in python. Nathan Rice <nathan.alexander.rice@gmail.com> - 2011-12-20 19:24 -0500
  Re: Elementwise -//- first release -//- Element-wise (vectorized) function, method and operator support for iterables in python. alex23 <wuwei23@gmail.com> - 2011-12-20 20:27 -0800
    Re: Elementwise -//- first release -//- Element-wise (vectorized) function, method and operator support for iterables in python. Nathan Rice <nathan.alexander.rice@gmail.com> - 2011-12-21 10:15 -0500
    Re: Elementwise -//- first release -//- Element-wise (vectorized) function, method and operator support for iterables in python. Robert Kern <robert.kern@gmail.com> - 2011-12-21 16:29 +0000
    Re: Elementwise -//- first release -//- Element-wise (vectorized) function, method and operator support for iterables in python. Nathan Rice <nathan.alexander.rice@gmail.com> - 2011-12-21 11:43 -0500

csiph-web