-
Notifications
You must be signed in to change notification settings - Fork 199
[Discussion] Ground Rules and Library Structure/Architecture #284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi Nucs, I think the most important guidance principle must be compatibility with the original NumPy. Only that way we can guarantee that porting Python scripts using numpy will work in NumSharp also. In this regard there is a lot of work to be done because until now it wasn't enforced very strongly. I agree that some kind of management of what we have and what we are missing would be nice. Creating issues is of course a good idea. I have another one: create as many test cases as possible which will reflect what already works and what not. I have recently ported a lot of tests from the Numpy documentation for NumSharp's sister project Numpy.NET which is a auto-generated wrapper around numpy. While doing that I also generated over 600 test cases which could be repurposed for testing NumSharp. In addition to that, we can generate further test cases that test both Numpy.NET and NumSharp against all the things you mentioned:
A complete test suite is the ultimate todo list and helps keeping NumSharp in sync with numpy. PS: I could help generating more test cases from the Numpy.NET project. |
ad 7: you can reach us on Gitter for quick questions, small talk, etc, but of course important stuff that should be accessible to all (like this) is of course best discussed in issues. I am sure @Oceania2018 will have answers for the other questions. |
ad 1: Ideally, support all primitive data type. |
All of these suggestions were implemented in the new release of NumSharp 0.11.0-alpha2 and available on nuget. |
ad 2: Would love to have Complex support. Just got to the end of a port and realized this was a non-starter. |
Uh oh!
There was an error while loading. Please reload this page.
I couldn't but notice the inconsistencies around the library, There are functions that returns copies while some don't while some are not even complete.
The strong-typing of C# does surely makes it harder to get stuff done so
.tt
generators does a nice job helping with that.I would like to discuss the following:
What are the supported C# primitive types compared to numpy?
Looking at the implicit conversions of
NDArray
and other math operations such asnp.sum
,I found that the type support is inconsistent.
note: Numpy supports both signed and unsigned types. see this.
Do we support
Complex
?because aside of the basic math operations, it is not supported anywhere.
To what rank/ndim the algorithms in C# support?
I saw some functions that support 2-3 and some up to 6.
Numpy limitation is 32 dimensions.
NDArray mutable vs immutable
I think it should be up to the user to decide via a bool parameter.
Seperation between
np
,NDArray
andbackend engine
There is a lot of mixup between whats computed where.
The reality is that they all redirect calls to each other.
In a perfect scenario:
we would refer all operations low-level operations to backend engine to perform the wanted task.
Having a fallback to each method that will compute in C#.
NDArray
is only responsible for casting, initialization, storing data and serializationAnd
np
is the high-level zone that uses backend.The incomplete methods should be logged somewhere, preferably in Issues or project here.
Heres just a few examples from my findings:
np.transpose
supports only to rank 2 and theres a//todo
in the unit test that failsnp.flatten
wasn't implemented completely but was shipped on releasenp.sum
doesn't support all data types.We should start by creating issues for those problems in code and we'll get on from there
Means of communication between the developing team via instant messaging?
Edit: Did not see the gitter tag on readme.md
Those issues are important to address, simply because this library is and will be the backend of many high-level applications.
That's about it, Best regards.
The text was updated successfully, but these errors were encountered: