[Numpy-discussion] A memory problem: why does mmap come up in numpy.inner?
Jon Wright
wright at esrf.fr
Thu Jun 5 08:06:42 EDT 2008
Michael Abshoff wrote:
> Jonathan Wright wrote:
>>
>> ...etc. We needed this for generating the .so library file name for
>> ctypes
>
> Can you elaborate on this a little?
The "we" refered to another project (not numpy) where we needed to
distinguish 32 bit from 64 bit platforms. We have code for picking which
shared library file to use similar to that below. Apologies if I've
confused the issue.
-Jon
----
if sys.platform == "linux2":
if platform.architecture()[0] == '32bit':
libfilename = 'libKLT32.so'
if platform.architecture()[0] == '64bit':
libfilename = 'libKLT64.so'
if sys.platform == "win32":
libfilename = 'klt.dll'
_libraries['klt_bin'] = CDLL(
os.path.join( os.path.split(__file__)[0],
libfilename )
)
# If you still don't have it you probably have a mac??
More information about the NumPy-Discussion
mailing list