>>> import operator
>>> from pynapl import APL
>>> apl = APL.APL()
>>> dot_ = apl.op(".+")
>>> dot_(operator.mul)([1, 2, 3], [1, 2, 3])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\rodri\Documents\Dyalog\pynapl\pynapl\APLPyConnect.py", line 307, in __fn
if len(args)==2: return self.eval("(⊃∆)(%s)2⊃∆"%aplfn, args[0], args[1], raw=raw)
File "C:\Users\rodri\Documents\Dyalog\pynapl\pynapl\APLPyConnect.py", line 381, in eval
raise APLError(json_obj=reply.data)
pynapl.APLPyConnect.APLError: SYNTAX ERROR
The expected behaviour would've been to compute 1 2 3 ×.+ 1 2 3. Instead, we get a SYNTAX ERROR.
This does not seem to be a shortcoming of dyadic operators in general, as we seem to be able to derive monadic operators from other dyadic operators; @ for example:
The expected behaviour would've been to compute
1 2 3 ×.+ 1 2 3
. Instead, we get aSYNTAX ERROR
. This does not seem to be a shortcoming of dyadic operators in general, as we seem to be able to derive monadic operators from other dyadic operators;@
for example:Probably related to the special casing mentioned in #9.