[f2py] arguments issue
pearu at cens.ioc.ee
pearu at cens.ioc.ee
Thu Mar 10 11:46:26 EET 2005
On Wed, 9 Mar 2005, Chris Fonnesbeck wrote:
> I have an f2py module for generating multivariate normal random
> variates, but am having problems with the argument list. The arguments
> are: 1. a list of expected values (input), 2. a covariance matrix
> (input) 3. the dimension of the multivariate quantity (hidden), 4. the
> output random variables (output) and 5. a function for generating
> standard normal variates (input). It compiles fine, but when I try
> running it, I get the following error:
>
> >>> genmn([0,0], [[1,0],[0,1]], normal)
> create_cb_arglist: Failed to build argument list (siz) with enough
> arguments (tot-opt) required by user-supplied function
> (siz,tot,opt=0,3,1).
> Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> flib.error: failed in processing argument list for call-back snorm.
What is the signature of normal that you are using above?
According to genmn.__doc__, it should be
def snorm(): return ae
Return objects:
ae : float
For example,
genmn([0,0], [[1,0],[0,1]],lambda:3)
works fine here. If this does not work for you, then what f2py version are
you using?
Pearu
More information about the f2py-users
mailing list