Ask Your Question

adnanbaysal's profile - activity

2022-01-28 15:31:57 +0200 received badge  Notable Question (source)
2022-01-28 15:31:57 +0200 received badge  Popular Question (source)
2019-01-07 09:55:20 +0200 received badge  Taxonomist
2016-02-05 15:51:01 +0200 commented answer subs() function gives KeyError when keyword is a list member

Thank you. This solved my problem.

2016-02-03 11:41:04 +0200 received badge  Student (source)
2016-02-03 11:33:19 +0200 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?