[Numpy-discussion] Minimal NumPy for distribution

Nathaniel Smith njs at pobox.com
Wed Sep 4 14:14:36 EDT 2013


There do exist numpy c functions that call .py file routines. I don't know
how likely you are to find them in practice, but it definitely happens.

You don't need .py files if you have .pyc files, and those can be
compressed (python can import directly from .zip files).

-n
On 4 Sep 2013 18:52, "Frédéric Bastien" <nouiz at nouiz.org> wrote:

> Hi,
>
> I have done some exploratory work with Theano to generate a shared library
> from a Theano function. This link with numpy c api. If we want to
> distribute this library and call it from C and/or python, what is the
> minimal installed part of NumPy needed? I suppose that only the c api is
> needed. Do someone already checked that?
>
> From what I found on linux, numpy linked with a dynamic BLAS take 13MB.
> There is 2.7MB from .so, 5.3MB from .py and 3.8MB from .pyc. Can we just
> keep all .so and remove all .py and .pyc file? I suppose we need to modify
> the __init__.py file too.
>
> On Windows, with the unofficial 64 bit binary of NumPy linked with MKL,
> the numpy directory take 56MB. So I would also like to know witch shared
> library(dll) is needed. Here is the .so file found on linux:
>
> /lib/python2.7/site-packages/numpy/core/multiarray_tests.so
> /lib/python2.7/site-packages/numpy/core/multiarray.so
> /lib/python2.7/site-packages/numpy/core/_dotblas.so
> /lib/python2.7/site-packages/numpy/core/_sort.so
> /lib/python2.7/site-packages/numpy/core/scalarmath.so
> /lib/python2.7/site-packages/numpy/core/umath_tests.so
> /lib/python2.7/site-packages/numpy/core/umath.so
> /lib/python2.7/site-packages/numpy/numarray/_capi.so
> /lib/python2.7/site-packages/numpy/linalg/lapack_lite.so
> /lib/python2.7/site-packages/numpy/random/mtrand.so
> /lib/python2.7/site-packages/numpy/fft/fftpack_lite.so
> /lib/python2.7/site-packages/numpy/lib/_compiled_base.so
>
> Can I get rid of all shared lib outside of core?
>
> thanks
>
> Frédéric
>
>
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20130904/652b9a1f/attachment.html>


More information about the NumPy-Discussion mailing list