Ask Your Question

adnanbaysal's profile - activity

2019-01-07 02:55:20 -0500 received badge  Taxonomist
2016-02-05 08:51:01 -0500 commented answer subs() function gives KeyError when keyword is a list member

Thank you. This solved my problem.

2016-02-03 04:41:04 -0500 received badge  Student (source)
2016-02-03 04:33:19 -0500 asked a question subs() function gives KeyError when keyword is a list member

I have a multivariate Boolean polynomial my_poly in xi (x0,x1,...,etc) and want to substitute one of the variables (say e.g. x0=0). my_poly subs(x0=0) works but I need to determine the exact variable (left hand side of '=') and value (right hand side of '=') at run-time depending on some conditions. The problem is subs() function do not accept expression on the left hand side of '=' and I have many xi variables, so if else is not practical. How can I solve this issue?