![]() | Compile and link the extra code extra_code
and the main code (loop) code:
nx = size(self.xcoor); ny = size(self.ycoor) a = zeros((nx,ny)) xcoor = self.xcoor; ycoor = self.ycoor err = weave.inline(code, ['a', 'nx', 'ny', 'xcoor', 'ycoor'], type_converters=weave.converters.blitz, support_code=extra_code, compiler='gcc') return a |
![]() | Note that we pass the names of the Python objects we want to access in the C++ code |
![]() | Weave is smart enough to avoid recompiling the code if it has not changed since last compilation |