Skip to content

Using inner product . from the Python side behaves as outer product. #9

@rodrigogiraoserrao

Description

@rodrigogiraoserrao
>>> from pynapl import APL
>>> apl = APL.APL()
>>> dot = apl.op(".")
>>> dot(operator.add)([1, 2, 3], [1, 2, 3])
[[2, 3, 4], [3, 4, 5], [4, 5, 6]]

This should raise some sort of error. Instead, it returns the result of 1 2 3 ∘.+ 1 2 3.

The issue seems to be in the __op inner function of APL.op, that special cases "." in a weird way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThings not working as they should.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions