-
Notifications
You must be signed in to change notification settings - Fork 15
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
[new+change+fix] Expanding Array creation Module #137
base: pre-0.4
Are you sure you want to change the base?
[new+change+fix] Expanding Array creation Module #137
Conversation
Do we have this feature already in the code? I believe that |
Let's say we return a slice ( |
This is interesting. |
@forFudan , Yes, the slices with those consecutive integers are interpreted that way. Now I am wondering which convention would be best to follow. In the current convention, there's no difference between a |
@shivasankarka Each Int decrease the dimension by 1. So slide 0:1 should not. This is the convention of numpy and I found this behavior well defined. Nx1 and 1xN should be differentiated if ndim is 2. |
@shivasankarka I have an interesting suggestion. Shall we just rename |
ndarray.shape in numpy is a tuple representing the shape. Having an iterable thing bound to either |
Currently, A.ndshape[0] So my proposal is to make it something like: A.shape[0] |
I don't see a problem with that change right now. To my knowledge, numpy exposes it as |
|
…ad of `A.shape()` or `A.ndshape`.
Making `A.shape` the way to get the `NDArrayShape` of an array
Rename the data buffer of `NDArrayShape` as `_buf`
New
Changes
(3, 2, 1)
becomes(3, 2)
, The matmul needs to be modified to account for this in cases likeNDArray
to_buf
.array.shape
returns the shape of array asNDArrayShape
.Fix
inout
before self forNDArray.__getitem__
.