2
from scipy_base import *
3
from scipy_base.fastumath import *
6
if type(a) in [type(1.0),type(1L),type(1),type(1j)]:
11
def check_func(thefunc, x0, args, numinputs, output_shape=None):
12
args = (x0[:numinputs],) + args
13
res = myasarray(apply(thefunc,args))
14
if (output_shape != None) and (res.shape != output_shape):
15
if (output_shape[0] != 1):
16
if len(output_shape) > 1:
17
if output_shape[1] == 1:
19
raise TypeError, "There is a mismatch between the input and output shape of %s." % thefunc.func_name