saulpw / aipl

Array-Inspired Pipeline Language
MIT License
119 stars 7 forks source link

How does the structure of a table get affected by an op? #22

Closed anjakefala closed 1 year ago

anjakefala commented 1 year ago

e.g. will replace the table (rankin=1.5, rankout=0)

!literal>feigenbaum
 4.66920
 !!python
 from aipl import defop
 from aipl.table import Table
 @defop('test', 1.5, 0)
 def testtest(aipl, t:Table) -> str:
     return '42'

 !test

e.g. will add a column (rankin=0, rankout=0)

!literal>feigenbaum
 4.66920
 !!python
 from aipl import defop
 from aipl.table import Table
 @defop('test', 0, 0)
 def testtest(aipl, t:Table) -> str:
     return '42'

 !test