Comments (5)
There is no matrix division operation in Python. The operation you show above is:
In [100]: b.T.solve(a.T).T
Out[100]:
⎡1 2⎤
⎢ ⎥
⎣3 4⎦
The transposes are needed because you're expecting the product a*inv(b)
For inv(b)*a
it's just a.solve(b)
.
from sympy.
Further investigation into the error after the decorator, line 2729, can be rewritten as return self * other.inv()
, which is works, but is also probably not desired. I believe the original reading should be something like, in matrix terms, A * B**(-1)
. I will wait on playing with this further until someone more experienced than me can comment.
from sympy.
It might be that SymPy is not intending to support system solves via this operator (I mean, maybe it was just a coincidence that it worked before). But I'm not sure the current state.
Do the docs give any indication of what should happen and what what classes of objects?
Assuming this is a regression, then Gaussian elimination would be better than explicitly inv computation for example.
from sympy.
I took a look through the documentation and didn't see anything for division. So, I suppose that sympy is not supporting division as it's not a common matrix operation. Given this appears to be a regression, are you suggesting doing something like the following to get back our [1, 2; 3, 4] matrix?
a = Matrix([[9, 19], [19, 41]])
b = Matrix([[1, 3], [4, 8]])
c = b.row_join(eye(2))
d = c.rref()
e = d[0]
e.col_del(0)
e.col_del(0)
a*e
Or is there a better solution?
from sympy.
Ok, we'll do this downstream then, thanks @oscarbenjamin for the hints on a.solve(b)
and similar.
from sympy.
Related Issues (20)
- The assumption in `FunctionClass` breaks subclassing `UndefinedFunction` with 3 args since SymPy 1.11 HOT 2
- better replace() for matching partial subexpressions HOT 4
- is:open
- sympy.physics.mechanics / nonlinear motion constraints HOT 12
- `simplify` hangs for complex, trigonometric, surd expression HOT 7
- Add sympy.tau HOT 10
- rref Method of class Matrix Error HOT 2
- How to solve `-1/x + 1/(log(x)^2)` equation via sympy ? wolfram able to solve the once HOT 1
- Useful for simplifying latex formula expressions, but doesn't work with fonts like mathbf HOT 2
- Title
- The only way I
- :white_check_mark:
- MultivariateBetaDistribution has incorrect support
- * Before, the plausible events were proxied via the `vercel.json` which would only work when deployed to vercel or when running `vercel dev` locally
- The only way I could do that was if you wanted me too I could come and pick it tyyyyyyyyyy HOT 1
- Error in integral result using hyper HOT 1
- sympy.diffgeom and Add class HOT 2
- Can't add N-dim arrays? HOT 2
- Plotting with Sympy
- Plotting with Sympy's inbuilt TextBackend doesn't seem to be working HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sympy.