ndstrides: [5] Implement np_{identity,eye,shape,strides,size} and ndarray.{fill.copy} #515

Open
lyken wants to merge 4 commits from ndstrides-5-miscfuncs into ndstrides-4-nparray
Collaborator

Implements some miscellaneous ndarray functions.

In particular, this PR introduces np_shape, np_strides, and np_size. These were initially used for debugging but they have been implemented as real NAC3 functions anyway.

Note that in NumPy, np.strides() is not an actual function, but <ndarray>.strides is used instead.

Other notes

On np_size()'s function signature: Is the function signature correct? I have encountered issues where if I directly use self.primitives.ndarray as the type for a, self.primitives.ndarray's dtype and ndims are substituted permanently. See commit "core/ndstrides: implement np_size()".

Implements some miscellaneous ndarray functions. In particular, this PR introduces `np_shape`, `np_strides`, and `np_size`. These were initially used for debugging but they have been implemented as real NAC3 functions anyway. Note that in NumPy, `np.strides()` is not an actual function, but `<ndarray>.strides` is used instead. ### Other notes On `np_size()`'s function signature: Is the function signature correct? I have encountered issues where if I directly use `self.primitives.ndarray` as the type for `a`, `self.primitives.ndarray`'s `dtype` and `ndims` are substituted permanently. See commit "core/ndstrides: implement np_size()".
lyken added 4 commits 2024-08-28 13:56:16 +08:00
lyken added a new dependency 2024-08-28 13:56:28 +08:00
lyken added a new dependency 2024-08-28 13:59:15 +08:00
lyken force-pushed ndstrides-5-miscfuncs from 6fb988a1e4 to 50ab93c9cc 2024-08-30 14:34:22 +08:00 Compare
Author
Collaborator

Rebased.

Rebased.
lyken force-pushed ndstrides-5-miscfuncs from 50ab93c9cc to d2072d9248 2024-08-30 14:41:13 +08:00 Compare
derppening force-pushed ndstrides-5-miscfuncs from d2072d9248 to e33f74b331 2024-10-17 16:12:33 +08:00 Compare
derppening force-pushed ndstrides-5-miscfuncs from e33f74b331 to eed3a77073 2024-10-17 16:13:15 +08:00 Compare
derppening force-pushed ndstrides-5-miscfuncs from eed3a77073 to 068385e981 2024-10-17 16:31:39 +08:00 Compare
derppening force-pushed ndstrides-5-miscfuncs from 068385e981 to e6f454c7a9 2024-10-18 14:24:13 +08:00 Compare
derppening force-pushed ndstrides-5-miscfuncs from e6f454c7a9 to 2c1030d158 2024-10-18 14:54:53 +08:00 Compare
This pull request can be merged automatically.
You are not authorized to merge this pull request.
You can also view command line instructions.

Step 1:

From your project repository, check out a new branch and test the changes.
git checkout -b ndstrides-5-miscfuncs ndstrides-4-nparray
git pull origin ndstrides-5-miscfuncs

Step 2:

Merge the changes and update on Gitea.
git checkout ndstrides-4-nparray
git merge --no-ff ndstrides-5-miscfuncs
git push origin ndstrides-4-nparray
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Reference: M-Labs/nac3#515
No description provided.