1
2
3
4
5
6
7 import boxmin._boxmin as _boxmin
8 import numpy as nx
9
11 """Force x to be a dense array"""
12 try:
13 if x.iscontiguous(): return x
14 finally:
15 return nx.array(x,'d')
16
17
19 """Wrapper class to turn a pointer to a compiled C function and data
20 packet into a callable object."""
22 return _boxmin.eval(self,dense(x))
23
24 - def __init__(self,generator, *args, **kw):
25 """cfitfn(pycfn_generator, args)
26
27 Return a callable object based on the supplied compiled C function generator"""
28 (self.cfitfn,self.cfitdata) = apply(generator,args,kw)
29 self.__doc__ = generator.__doc__
30
33