After defining a vector `x` and one of its components, say `x0`,
```
import sympy
x = sympy.DeferredVector('x')
x0 = x[0]
```
is there any way to relate `x0` back to `x`? I.e., I'm looking for a
Boolean function that returns `True` for the question "Is x0 a component of
x?"
--
You received this
I found a wrong expression to indicate a variable in "Wigner6j.doit()".
Original in Sympy version 0.7.6:
def doit(self, **hints):
if self.is_symbolic:
raise ValueError("Coefficients must be numerical")
return wigner_6j(self.j1, self.j2, self.j12, self.j3, self.j,
s
Hi,
Yes, that is a typo, if you'd like to submit a PR on github we'd be happy
to merge it. Thanks for finding it.
Sean
On Wed, Aug 19, 2015 at 10:09 AM, wrote:
> I found a wrong expression to indicate a variable in "Wigner6j.doit()".
>
> Original in Sympy version 0.7.6:
> def doit(self, **
This is why var() is not recommended except for interactive use. Aside from
doing an un-Pythonic thing (creating Python variables without using an
assignment), it can only inject variables into the global scope, due to the
way variables work in Python. This means that if you use var() inside of a
f
It doesn't look like there is. DeferredVector just works by creating
Symbol('x[0]'). I think for the use-case it was designed for, this is fine.
You probably want to be using Indexed and IndexedBase instead.
Aaron Meurer
On Wed, Aug 19, 2015 at 6:07 AM, Nico wrote:
> After defining a vector `x`
There is also the MatrixSymbol class that may be better here. The
DeferredVector was created with a very narrow need for the lambdify
functions, I wouldn't recommend using it for anything other.
Jason
moorepants.info
+01 530-601-9791
On Wed, Aug 19, 2015 at 12:57 PM, Aaron Meurer wrote:
> It d
> There is also the MatrixSymbol class that may be better here.
Quite interesting!
Is there such a thing as a VectorSymbol as well? (I saw the `is_Vector`
property here but never saw it True, neither for MatrixSymbols nor for
DeferredVectors.)
--Nico
On Wed, Aug 19, 2015 at 10:20 PM Jason Moor
We don't distinguish between vectors and column matrices. You can check the
matrix's shape.
Jason
moorepants.info
+01 530-601-9791
On Wed, Aug 19, 2015 at 1:42 PM, Nico Schlömer
wrote:
> > There is also the MatrixSymbol class that may be better here.
>
> Quite interesting!
> Is there such a th
Once I had some issues with cache in sympy and recently noticed this nice idea
cachey. Seems to be a perfect fit for sympy? In short the idea is to cache
based on size and computation effort using a simple formula.
http://matthewrocklin.com/blog/work/2015/08/03/Caching/
The goal is to keep the