You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pyasp supports having a str and a int as arguments for an atom (Term). Apparently clyngor.as_pyasp does not. Here is a MWE:
from pyasp import *
from clyngor.as_pyasp import TermSet, Atom
elem = 'plop'
weight = 2
cofactors_pyasp = Term('cofactor', ["\""+elem+"\"",+weight])
cofactors_clyngor = Atom('cofactor', ["\""+elem+"\"",+weight])
print(cofactors_pyasp)
print(cofactors_clyngor)
gives the following error for the clyngor version:
Traceback (most recent call last):
File "../menetools/test_print.py", line 10, in <module>
print(cofactors_clyngor)
File "/Users/cfrioux/wd/scripts/MeneTools/venv_clyngor/lib/python3.7/site-packages/clyngor/as_pyasp.py", line 32, in __str__
return '{}({})'.format(self.predicate, ','.join(self.arguments))
TypeError: sequence item 1: expected str instance, int found
whereas the pyasp version gives:
cofactor("plop",2)
The text was updated successfully, but these errors were encountered:
Pyasp supports having a str and a int as arguments for an atom (Term). Apparently clyngor.as_pyasp does not. Here is a MWE:
gives the following error for the clyngor version:
whereas the pyasp version gives:
The text was updated successfully, but these errors were encountered: