[Numpy-discussion] [SciPy-Dev] PyRSB: Python interface to librsb sparse matrices library

Sylvain Corlay sylvain.corlay at gmail.com
Sun Jun 25 15:24:37 EDT 2017


Hi Michele,

Regarding xtensor, the article focused on how we can wrap an existing data
structure in an "xtensor expression", i.e. something that you can operate
upon with the numpy style API in C++ (see the numpy to xtensor cheat sheet
http://xtensor.readthedocs.io/en/latest/numpy.html). Since it is an
expression system, you can do "a + b * sin(t)" with numpy-style
broadcasting and it returns an un-evaluated expression, which is computed
only upon access or assignment to a container. "a", "b", and "c" could all
be compound expressions, backed by filesystem operations, be an in-memory
container, or a wrapper on your sparse matrices...

Now, we are working on automating the "*C++ tensor expression-type ->
python wrapper with access and math operators" *generation of code, which
would be what you are describing below...

On the subject of the LGPL, regarding the distinction with the GPL that
were brought up earlier in the thread, it is indeed not as problematic as
the GPL, but still less permissive as BSD and MIT. In general, I think that
using a BSD or MIT license averts these concerns in the Python ecosystem,
and is preferable *if you don't care about copyleft*...

Best,

Sylvain

On Sun, Jun 25, 2017 at 12:01 PM, Michele Martone <
michelemartone at users.sourceforge.net> wrote:

> On 20170624 at 16:29, Sylvain Corlay wrote:
> > Hi Michele,
>
> Hi Sylvain,
>
> > This is really interesting. I am a co-author of the xtensor project and
> one
> > thing that could be interesting is to wrap the various sparse matrix data
> > structures in the form of xtensor expressions. A byproduct of doing so is
> > that it would simplify creating bindings for multiple scientific
> computing
> > languages (Python, Julia, R, and more coming). You can see the blog post
> > http://quantstack.net/c++/2017/05/30/polyglot-scientific-computing-with-
> > xtensor.html for reference...
> This article exemplifies manipulation of numerical arrays.
> Now I ask you: Given an interactive language $L of the one you cite above,
> can xtensor provide objects with custom type and operators for manipulation
> in *that* language, like in e.g. the pyrsb case:
>   a=rsb_matrix((4,4))
>   print(a+a) # + operator and 'print' interfacing
> ?
>
> > Also, one quick question: is the LGPL license a deliberate choice or is
> it
> > not important to you? Most projects in the Python scientific stack are
> BSD
> > licensed. So the LGPL choice makes it unlikely that a higher-level
> project
> > adopts it as a dependency. If you are the only copyright holder, you
> would
> > still have the possibility to license it under a more permissive license
> > such as BSD or MIT...
> No important choice.
> No problems relicensing the PyRSB prototype to BSD or MIT.
>
> > Congratulations on the release!
> Thanks for the interest and welcome constructive feedback :-)
>
> > Sylvain
> >
> >
> >
> >
> >
> > On Wed, Jun 21, 2017 at 11:51 AM, Michele Martone <michelemartone at users.
> > sourceforge.net> wrote:
> >
> > > Hi.
> > >
> > >  I'm the author of the high performance multithreaded sparse matrix
> > > library `librsb' (mostly C, LGPLv3): http://librsb.sourceforge.net/
> > >
> > >  I'm *not* a user of SciPy/NumPy/Python, but using Cython I have
> > > written a proof-of-concept interface to librsb, named `PyRSB':
> > >  https://github.com/michelemartone/pyrsb
> > >
> > >  PyRSB is in a prototypal state; e.g. still lacks good error handling.
> > >  Its interface is trivial, as it mimicks that of SciPy's 'csr_matrix'.
> > >  Advantages over csr_matrix are in fast multithreaded multiplication
> > > of huge sparse matrices.
> > >  Intended application area is iterative solution of linear systems;
> > > particularly fast if with symmetric matrices and many rhs.
> > >
> > > With this email I am looking for prospective:
> > >  - users/testers
> > >  - developers (any interest to collaborate/adopt/include the project?)
> > >
> > > Looking forward for your feedback,
> > > Michele
> > >
> > > _______________________________________________
> > > SciPy-Dev mailing list
> > > SciPy-Dev at python.org
> > > https://mail.python.org/mailman/listinfo/scipy-dev
> > >
> > >
>
> > _______________________________________________
> > SciPy-Dev mailing list
> > SciPy-Dev at python.org
> > https://mail.python.org/mailman/listinfo/scipy-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20170625/1f5cd850/attachment-0001.html>


More information about the NumPy-Discussion mailing list