SciSharp / NumSharp

High Performance Computation for N-D Tensors in .NET, similar API to NumPy.
https://github.com/SciSharp
Apache License 2.0
1.37k stars 192 forks source link

numpy.allclose #236

Closed henon closed 5 years ago

henon commented 5 years ago

Hey, I was thinking of doing a C# port of numpy. When I discovered you had already done so and it is quite far progressed I was thrilled.

I am in need of a lot of functions you haven't written yet, so I am going to contribute. I'd like to start with numpy.allclose since it seems to be quite straight forward.

henon commented 5 years ago

Btw, any pointers where to add it and what to pay attention to would be appreciated ;)

Oceania2018 commented 5 years ago

Welcome to bring more functions. @henon remember to sync with upstream often.

henon commented 5 years ago

Got it.

Btw: how to run the tests? When I try to run them in Visual Studio 17 I get this:

[04.04.2019 16:17:06 Informational] ------ Discover test started ------ [04.04.2019 16:17:08 Informational] ========== Discover test finished: 0 found (0:00:01,8469274) ========== [04.04.2019 16:17:08 Informational] No tests found to run. [04.04.2019 16:17:10 Informational] ------ Discover test started ------ [04.04.2019 16:17:11 Informational] NUnit Adapter 3.13.0.0: Test discovery starting [04.04.2019 16:17:11 Informational] NUnit failed to load D:\dev\NumSharp.git\src\NumSharp.Core\bin\Debug\netstandard2.0\NumSharp.Core.dll [04.04.2019 16:17:11 Informational] NUnit failed to load D:\dev\NumSharp.git\src\NumSharp.Python\bin\Debug\netstandard2.0\NumSharp.Python.dll [04.04.2019 16:17:11 Informational] NUnit Adapter 3.13.0.0: Test discovery complete [04.04.2019 16:17:11 Warning] No test is available in D:\dev\NumSharp.git\src\NumSharp.Core\bin\Debug\netstandard2.0\NumSharp.Core.dll D:\dev\NumSharp.git\src\NumSharp.Python\bin\Debug\netstandard2.0\NumSharp.Python.dll. Make sure that test discoverer & executors are registered and platform & framework version settings are appropriate and try again.

Oceania2018 commented 5 years ago

You can use built-in of VS 2017 test explorer. image

henon commented 5 years ago

I guess my .net core sdk version is not correct, that's why no tests are found

Oceania2018 commented 5 years ago

install .net core 2.2

henon commented 5 years ago

I can't get it to work with .net core 2.2, no matter what I do. List of target frameworks goes only til .net core 2.1

Here is what I did:

Interestingly the project builds just fine against .net core 2.1, so I downgraded my projects to that target and now everything works, including the tests. When I post the pull request that downgrade will be a separate pull request, you can decide whether to merge it or not.

Oceania2018 commented 5 years ago

OK, looking forward for your first PR.

henon commented 5 years ago

PR has been merged.