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
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",
>>
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(
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