learn-multibody-dynamics icon indicating copy to clipboard operation
learn-multibody-dynamics copied to clipboard

Add intersphinx mapping to SymPy matrix methods

Open moorepants opened this issue 3 years ago • 7 comments

  • [ ] hadamard_product
  • [x] inv()
  • [x] LUsolve

There are probably a couple more on that page. I had trouble finding the node in SymPy's docs (may not exist in some cases).

moorepants avatar Feb 07 '23 15:02 moorepants

location of LUsolve For inv() I would guess this location. I could not find anything for hadamard_product.

tjstienstra avatar Feb 09 '23 08:02 tjstienstra

I found this in the sympy documentation

multiply_elementwise(other)[source] Return the Hadamard product (elementwise product) of A and B

Examples

from sympy import Matrix A = Matrix([[0, 1, 2], [3, 4, 5]]) B = Matrix([[1, 10, 100], [100, 10, 1]]) A.multiply_elementwise(B) Matrix([ [ 0, 10, 200], [300, 40, 5]])

Peter230655 avatar Feb 09 '23 09:02 Peter230655

Oh yeah, maybe I should recommend that instead of the hadamard_product() function. I guess they are the same.

moorepants avatar Feb 09 '23 09:02 moorepants

There is a top level function called sympy.hadamard_product() that isn't in the documentation (docstring). And multiply_elementwise() is a method for Matrices. I think I showed hadamard because it was a function not a method.

moorepants avatar Feb 09 '23 10:02 moorepants

The endpoint for hadamard_product will be in 1.12: https://github.com/sympy/sympy/pull/23900

moorepants avatar Feb 09 '23 10:02 moorepants

Helpful command I just learned:

python -m sphinx.ext.intersphinx 'https://docs.sympy.org/latest/objects.inv' > sympy-inter.txt

moorepants avatar Feb 09 '23 10:02 moorepants

Fixed LUsolve and inv in 5f9a1d0a3d1068634a85bc6b7a06e03e91c1e04c

moorepants avatar Feb 09 '23 10:02 moorepants