Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #17684
| References | <CAOFbRmLyw88pHNSdszQY672ukAcm965jDUamXQGOFXoX9pd3+Q@mail.gmail.com> |
|---|---|
| From | Ian Kelly <ian.g.kelly@gmail.com> |
| Date | 2011-12-21 10:54 -0700 |
| Subject | Re: Elementwise -//- first release -//- Element-wise (vectorized) function, method and operator support for iterables in python. |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.3935.1324490112.27778.python-list@python.org> (permalink) |
On Tue, Dec 20, 2011 at 12:45 PM, Nathan Rice
<nathan.alexander.rice@gmail.com> wrote:
> Elementwise provides a proxy object for iterables which supports
> chained method calls, as well as elementwise expressions and some
> built-in functions.
It doesn't seem to work correctly when both operands are Elementwise:
>>> numerator = ElementwiseProxy(range(5))
>>> denominator = ElementwiseProxy([2, 2, 3, 3, 3])
>>> remainder = numerator % denominator
>>> print remainder
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "elementwise.py", line 72, in __repr__
return ", ".join(e.__repr__() for e in
object.__getattribute__(self, "iterable"))
TypeError: sequence item 0: expected string, ElementwiseProxy found
>>> list(remainder)
[]
Cheers,
Ian
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Elementwise -//- first release -//- Element-wise (vectorized) function, method and operator support for iterables in python. Ian Kelly <ian.g.kelly@gmail.com> - 2011-12-21 10:54 -0700
csiph-web