[sympy] sympy.stats how to lambdify with array arguments

2013-08-29 Thread Janwillem van Dijk
il to sympy@googlegroups.com. Visit this group at http://groups.google.com/group/sympy. For more options, visit https://groups.google.com/groups/opt_out. # -*- coding: utf-8 -*- """ Created on Wed Aug 28 13:33:03 2013 @author: Janwillem van Dijk Statistics of the product of two or

Re: [sympy] sympy.stats how to lambdify with array arguments

2013-08-30 Thread Janwillem van Dijk
))] > > In [6]: E(prod(Xs)) > << Big Scary Thing >> > > In [7]: simplify(E(prod(Xs))) > Out[7]: μ₀⋅μ₁⋅μ₂⋅μ₃⋅μ₄ > > Please note that you shouldn't have to switch down to numerics for this > problem. There is a clean analytic form. > > > > On Th

Re: [sympy] sympy.stats how to lambdify with array arguments

2013-08-31 Thread Janwillem van Dijk
t; Or, if you need your current interface > > In [9]: numeric_mus = [1,2,3,4,5] > > In [10]: numeric_sigmas = [10, 11, 12, 13, 14] > > In [11]: f(*(numeric_mus + numeric_sigmas)) > Out[11]: 120 > > > > On Fri, Aug 30, 2013 at 3:09 PM, Janwillem van Dijk > >

[sympy] SymPy error running Python3

2014-01-07 Thread Janwillem van Dijk
I have a SymPy script with a.o. f_mean = lambdify([mu, sigma], mean, modules='numpy') where mean is a function of mu and sigma and mu and sigma are both arrays mu = symbols('mu_0:%d' % n, real=True, bounded=True) sigma = symbols('sigma_0:%d' % n, positive=True, real=True, bounded=True) Unde

[sympy] Re: SymPy error running Python3

2014-01-10 Thread Janwillem van Dijk
rror: () missing 1 required positional argument: 'x_1' Hope this helps to clearify the point. Cheers, Janwillem On Tuesday, 7 January 2014 11:04:30 UTC+1, Janwillem van Dijk wrote: > > I have a SymPy script with a.o. > > f_mean = lambdify([mu, sigma], mean, modules='

[sympy] Re: SymPy error running Python3

2014-01-12 Thread Janwillem van Dijk
fx(*[X, a])) TypeError: () missing 2 required positional arguments: 'a_0' and 'a_1' and the same for a variation without * print('function value=', fx(X, a)) TypeError: () missing 2 required positional arguments: 'a_0' and 'a_1' So still all help

[sympy] Re: SymPy error running Python3

2014-01-13 Thread Janwillem van Dijk
my environment linux: Linux-3.11.0-12-generic-x86_64-with-Ubuntu-13.10-saucy python: 3.3.2+ (default, Oct 9 2013, 14:50:09) [GCC 4.8.1] sympy: 0.7.4.1-git numpy: 1.7.1 or python: 2.7.5+ (default, Sep 19 2013, 13:48:49) [GCC 4.8.1] On Tuesday, 7 January 2014 11:04:30 UTC+1, Janwillem van