A collection of Pipe definitions for working with sympy.
Project description
SymPy Pipe
This package provides a subset of the SymPy expression manipulation functionality as pipes (using the Pipe package). This facilitates their usage (especially when doing interactive manipulation in Jupyter). They all act on single expressions or, most useful, on iterables of expressions (returning a respective generator).
The pipes have the same interface as the original SymPy functions/methods, with the exception of the first parameter being the expression or expression iterable to work on (filled by the | operator).
Examples
All examples depend on the following initialization code:
from sympy import Symbol
x = Symbol("x")
y = Symbol("y")
simplify
from sympy_pipes import simplify
x + x | simplify
[x + x, 2 * x + x] | simplify
subs
from sympy_pipes import subs
x | subs(x, y)
[x, 2 * x] | subs({x: y})
limit
from sympy_pipes import limit
x**2 | limit(x, 1)
[x**2, 2 * x] | limit(x, y)
diff
from sympy_pipes import diff
x**2 | diff(x)
[x**2, 2 * x] | diff(x, 2)
integrate
from sympy_pipes import integrate
x | integrate(x)
[x, 2 * x] | integrate((x, 1, 2))
display
To pretty print iterables of expressions in Jupyter environments. This function is only available, if IPython is installed in the environment!
The display pipe returns its input, so it can be used to output intermediate results.
from sympy_pipes import display, subs
x | display | subs(x, y) | display
[x, 2 * x] | display | subs(x, y) | display
License
The code is published under the terms of the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sympy_pipes-0.1.0.tar.gz.
File metadata
- Download URL: sympy_pipes-0.1.0.tar.gz
- Upload date:
- Size: 2.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e64e049d6517427fd8996da761ff614211976b8aa302902cf5b51670c038ac83
|
|
| MD5 |
6a22babb9070dc928bf27c4bb7c5ec5a
|
|
| BLAKE2b-256 |
4b2d2529bf62c7178d8609036bdf0df01fe976e37e81d563982c2528d48fc811
|
File details
Details for the file sympy_pipes-0.1.0-py3-none-any.whl.
File metadata
- Download URL: sympy_pipes-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c5b9a2063c9fd4ab77e265ef4fd1bb2a256d7466a73216143a2bc2bcddbdc4bb
|
|
| MD5 |
9a1c42172f5b4f6c0c358e2de5dfb4aa
|
|
| BLAKE2b-256 |
f583c088ae48596ce20453b3ea9d7fb36ae6801e756a11c65b0995cea9e3c452
|