Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misc fixes #1100

Merged
merged 6 commits into from Nov 27, 2020
Merged

Misc fixes #1100

merged 6 commits into from Nov 27, 2020

Conversation

skirpichev
Copy link
Collaborator

No description provided.

@skirpichev skirpichev added this to the 0.12 milestone Nov 26, 2020
@skirpichev
Copy link
Collaborator Author

@sylee957, maybe it could be interesting to you. It seems, either eval() error in the sympy/sympy#20484 is fixed in the Diofant or it's a regression.

Also, you may do that you want with poly_subs() by existing .compose() method:

In [24]: R, x, y, z = ring('x y z', ZZ)

In [25]: f = x*y*z

In [26]: f.compose(x, y*z)
Out[26]: y**2*z**2

In [27]: _26.ring
Out[27]: ℤ[x, y, z]

In [28]: f.compose(x, y*z).drop(x)
Out[28]: y**2*z**2

In [29]: _28.ring
Out[29]: ℤ[y, z]

In [33]: R, x, y = ring('x y', QQ)

In [34]: f = x**2 + 1

In [35]: f.compose(x, x + y)
Out[35]: x**2 + 2*x*y + y**2 + 1

(For FractionField's this is not implemented yet either in the SymPy or the Diofant. I'll, probably, fix this in the current PR.)

@skirpichev skirpichev added polys enhancement new feature requests (or implementation) labels Nov 26, 2020
@skirpichev
Copy link
Collaborator Author

#961 seems to be also relevant here.

@skirpichev skirpichev marked this pull request as ready for review November 26, 2020 14:20
@skirpichev skirpichev merged commit 7745ad3 into diofant:master Nov 27, 2020
@skirpichev skirpichev deleted the misc branch November 27, 2020 03:13
@diofant diofant deleted a comment from github-actions bot Nov 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation enhancement new feature requests (or implementation) polys testing
Development

Successfully merging this pull request may close these issues.

None yet

1 participant