Re: [Numpy-discussion] Usage of NotImplemented in Numexpr

2006-10-16 Thread Tim Hochberg
Ivan Vilata i Balaguer wrote: > En/na Tim Hochberg ha escrit:: > > >> Ivan Vilata i Balaguer wrote: >> >>> for i, x in enumerate(args): >>> if isConstant(x): >>> args[i] = ConstantNode(x) >>> elif not isinstance(x, ExpressionNode): >>> raise TypeE

Re: [Numpy-discussion] Usage of NotImplemented in Numexpr

2006-10-16 Thread Ivan Vilata i Balaguer
En/na Tim Hochberg ha escrit:: > Ivan Vilata i Balaguer wrote: >> >> for i, x in enumerate(args): >> if isConstant(x): >> args[i] = ConstantNode(x) >> elif not isinstance(x, ExpressionNode): >> raise TypeError( "unsupported object type: %s", >>

Re: [Numpy-discussion] Usage of NotImplemented in Numexpr

2006-10-16 Thread Tim Hochberg
Ivan Vilata i Balaguer wrote: > Looking at the ``ophelper()`` decorator in the ``expressions`` module of > Numexpr, I see the following code is used to check/replace arguments of > operators:: > > for i, x in enumerate(args): > if isConstant(x): > args[i] = x = ConstantNode(

[Numpy-discussion] Usage of NotImplemented in Numexpr

2006-10-16 Thread Ivan Vilata i Balaguer
Looking at the ``ophelper()`` decorator in the ``expressions`` module of Numexpr, I see the following code is used to check/replace arguments of operators:: for i, x in enumerate(args): if isConstant(x): args[i] = x = ConstantNode(x) if not isinstance(x, ExpressionN