[Numpy-discussion] [SPAM]Re: introducing Numpy.net, a pure C# implementation of Numpy
Charles R Harris
charlesr.harris at gmail.com
Sat Mar 16 13:22:01 EDT 2019
On Sat, Mar 16, 2019 at 11:10 AM <kmckenna at baselinesw.com> wrote:
>
>
>
>
> *From:* NumPy-Discussion <numpy-discussion-bounces+kmckenna=
> baselinesw.com at python.org> *On Behalf Of *Charles R Harris
> *Sent:* Saturday, March 16, 2019 12:06 PM
> *To:* Discussion of Numerical Python <numpy-discussion at python.org>
> *Subject:* [SPAM]Re: [Numpy-discussion] introducing Numpy.net, a pure C#
> implementation of Numpy
>
>
>
>
>
>
>
> On Sat, Mar 16, 2019 at 10:02 AM Charles R Harris <
> charlesr.harris at gmail.com> wrote:
>
>
>
>
>
> On Sat, Mar 16, 2019 at 4:41 AM <kmckenna at baselinesw.com> wrote:
>
> This is a quick note to announce open source numpy.net available at this
> repository
>
>
>
> https://github.com/Quansight-Labs/numpy.net
>
>
>
> This is a pure C# based implementation of Numpy, ported from the
> underlying C library and the python application layer.
>
> Written and tested on .NET standard 2.1 so it will run anywhere.
>
>
>
> I have the vast majority of the most commonly used functions implemented
> and unit tested. It supports fully functional slicing and views.
>
> Verified to generate binary compatible output with python numpy.
>
>
>
> I built it because I was tasked with porting a large Python Numpy
> application to C# and as you may know, there are not a lot of good
> solutions (until now). My employer graciously agreed to open source it.
>
>
>
> If you have some time to review it, I'd love to get some feedback from
> some Numpy experts (I don't consider myself one).
>
>
>
> I believe it is ready to start building tools like SciPy on top of it.
>
>
>
> Longer term, I would like to see this ported to Java. I expect pure C# to
> port easily to Java.
>
>
>
> That's interesting. What parts are in C#? Any benchmarks comparing the two
> implementations?
>
>
>
>
>
> What about BLAS libraries?
>
>
>
>
>
> 1. All of it is in C#. The underlying C code was ported and so was
> the python layer.
> 2. Benchmarks? If you mean performance benchmarks, I have nothing
> official but I will say that the C# implementation is not as fast as the
> optimized C code and it never will be. The only place you would really
> notice it is if you were doing a UFUNC operation on a large array.
> 3. I am not a numpy programmer so I don’t know what BLAS libraries
> are. I just did a quick google and my guess is that this is not relevant
> in my implementation.
>
>
>
> I envision my tool to be used if someone wants to port a numpy application
> to .NET or wants to do Numpy things in a .NET application,
>
>
>
Just reply to the discussion, I may have made a boo boo in replying to your
first post.
I'm curious. Implementing NumPy in another language seems like quite a bit
of work. Did you have any tools to make it easier? I assume the C api is
gone, so that the translation is NumPy program specific. I've never used
C#, was there a reason to avoid C? What about IronPython? IIRC there was
some work to make NumPy run on IronPython before that project was ended.
I'm also curious what the application was that made it impossible to stay
with python, I suppose the customer wanted C#, but I'd like to know why
plain old Python was not an option.
Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20190316/ca561be1/attachment.html>
More information about the NumPy-Discussion
mailing list