ndstrides: [4] Implement np_array() #514

Open
lyken wants to merge 4 commits from ndstrides-4-nparray into ndstrides-3-indexing
Collaborator

Reimplemented np_array() + Proper assertions when the input is a list (e.g., raise an exception when the list has inhomogeneous dimensions).

However, currently only np_array(<input>, copy=False) and np_array(<input>, copy=True) are supported.In NumPy, copy could be false, true, or None. Right now with this PR, NAC3's np_array(<input>, copy=False) behaves like NumPy's np.array(<input>, copy=None). Fortunately this should be easy to implement.

Reimplemented `np_array()` + Proper assertions when the input is a list (e.g., raise an exception when the list has inhomogeneous dimensions). However, currently only `np_array(<input>, copy=False)` and `np_array(<input>, copy=True)` are supported.In NumPy, copy could be `false`, `true`, or `None`. Right now with this PR, NAC3's `np_array(<input>, copy=False)` behaves like NumPy's `np.array(<input>, copy=None)`. Fortunately this should be easy to implement.
lyken added 4 commits 2024-08-28 13:51:23 +08:00
da23bb1417
core/irrt: add List
Needed for implementing np_array()
b158ec80b4
core/ndstrides: implement np_array()
It also checks for inconsistent dimensions if the input is a list.
e.g., rejecting `[[1.0, 2.0], [3.0]]`.
lyken added a new dependency 2024-08-28 13:52:09 +08:00
lyken force-pushed ndstrides-4-nparray from b158ec80b4 to 81e937db82 2024-08-30 14:26:13 +08:00 Compare
Author
Collaborator

Rebased.

Rebased.
lyken force-pushed ndstrides-4-nparray from 81e937db82 to f109c58da8 2024-08-30 14:38:34 +08:00 Compare
Author
Collaborator

Rebased to fix some formatting issues.

Rebased to fix some formatting issues.
lyken force-pushed ndstrides-4-nparray from f109c58da8 to d222236492 2024-08-30 14:40:19 +08:00 Compare
derppening force-pushed ndstrides-4-nparray from d222236492 to de732ba68e 2024-10-17 14:27:57 +08:00 Compare
derppening force-pushed ndstrides-4-nparray from de732ba68e to 2c3463c516 2024-10-17 16:10:37 +08:00 Compare
derppening force-pushed ndstrides-4-nparray from 2c3463c516 to 6234060e85 2024-10-17 16:31:18 +08:00 Compare
derppening force-pushed ndstrides-4-nparray from 6234060e85 to 8f0084ac8a 2024-10-18 14:23:46 +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-4-nparray ndstrides-3-indexing
git pull origin ndstrides-4-nparray

Step 2:

Merge the changes and update on Gitea.
git checkout ndstrides-3-indexing
git merge --no-ff ndstrides-4-nparray
git push origin ndstrides-3-indexing
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#514
No description provided.