Implement subscript-assignment for NDArrays #411

Open
opened 2024-06-11 15:48:40 +08:00 by derppening · 1 comment
Collaborator

Primarily gen_store_target.

Primarily `gen_store_target`.
lyken self-assigned this 2024-06-21 13:44:55 +08:00
Collaborator

Implemented in ndstrides. The following is also implemented:

x = np_zeros((3, 4))
y = np_transpose(x)
z = y[::3]
print(z)
# z.shape == (2, 3)
z[::-1] = 99.0
print(x)
# array([[99.,  0.,  0., 99.],
#        [99.,  0.,  0., 99.],
#        [99.,  0.,  0., 99.]])
Implemented in `ndstrides`. The following is also implemented: ```python x = np_zeros((3, 4)) y = np_transpose(x) z = y[::3] print(z) # z.shape == (2, 3) z[::-1] = 99.0 print(x) # array([[99., 0., 0., 99.], # [99., 0., 0., 99.], # [99., 0., 0., 99.]]) ```
Sign in to join this conversation.
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#411
No description provided.