Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #470 from yarikoptic/bf-sympy
MRG: avoid relying on Pythonic casting of bool into numeric for sympy expressions sympy 1.6 introduced breaking change (see https://github.com/sympy/sympy/wiki/Release-Notes-for-1.6 for full log): Relational is no longer a subclass of Expr and does not produce nonsensical results in arithmetic operations. This affects all Relational subclasses (Eq, Ne, Gt, Ge, Lt, Le). It is no longer possible to call meaningless Expr methods like as_coeff_Mul on Relational instances. (#18053 by @oscarbenjamin) which broke all Pythonish expressions like `(x > 0) * (x < 1)` to define a square wave. Thanks to guidance from @oscarbenjamin in sympy/sympy#20981 I RFed all such uses to use sympy.Piecewise instead to make it more explicit. While at it, I also adjusted comments claiming intervals like `[0, 1]` (which includes the endpoints), whenever in reality they were `(0, 1)` (endpoints not included). This is closes #466
- Loading branch information
Showing
3 changed files
with
9 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters