I opened https://github.com/sympy/sympy/issues/2790 for this issue so
it's not forgotten about. Let us know if you want to give it a shot
fixing it.
Aaron Meurer
On Mon, Jan 13, 2014 at 10:56 AM, Ondřej Čertík wrote:
> Janwillem, thanks for sending the script to the list.
> That's the most effic
Janwillem, thanks for sending the script to the list.
That's the most efficient way to get things done.
Ondrej
On Mon, Jan 13, 2014 at 1:28 AM, Janwillem van Dijk
wrote:
> I would be very glad if that could be done. My little project is part of a
> discussion on uncertainty evaluation in radiati
To add to the * solution discussion:
In the past I had hidden the * by defining something like
_f_x = sympy.lambdify([x, a], y)
def f_x(x, a):
return _f_x(*numpy.hstack([x, a]))
This works on Python3.3 but now I get on Python2.7:
Traceback (most recent call last):
File "sympy-numpy_2.p
I still think we should fix this so that it just works out of the box.
Squashing everything into one array is more complicated than it needs
to be.
Aaron Meurer
On Sun, Jan 12, 2014 at 4:08 PM, Jason Moore wrote:
> numpy.hstack and numpy.vstack are typically used for concatenation of numpy
> ar
numpy.hstack and numpy.vstack are typically used for concatenation of numpy
arrays. I typically use it and the * for passing lots of args into lambdify.
Jason
moorepants.info
+01 530-601-9791
On Sun, Jan 12, 2014 at 5:04 PM, Aaron Meurer wrote:
> Your code still doesn't work for me in Python
Your code still doesn't work for me in Python 2 either.
But the point has been received. This sort of thing (nested arguments)
should probably work.
You need to understand what the * does. It denestst the list into
arguments, so that
f(*[1, 2, 3])
is the same as
f(1, 2, 3)
You are basically c
Thanks for the comments.
You are right, that works. So that example was my lengthy scripts too far
simplified. In my actual program the functions have two arrays as input
(expectation and standard uncertainty in a measurement model) and than the
* does not work anymore. I understood from the doc
On Sat, Jan 11, 2014 at 1:49 AM, Janwillem van Dijk
wrote:
> Ondřej, I did send you my complete 900 lines scripts to show the problem and
> did not think of making a very simple demo; here it is:
But it doesn't help the rest of us if you only send your script to Ondrej.
>
>
> import sympy
>
> im
Ondřej, I did send you my complete 900 lines scripts to show the problem
and did not think of making a very simple demo; here it is:
import sympy
import numpy
n = 2
formula = 'x_0 + x_1'
x = sympy.symbols('x_0:%d' % n, real=True, bounded=True)
y = sympy.sympify(formula)
fx = f_x = sympy.la