Replies: 2 comments
-
@nnethery Example; let a = Matft.arange(start: 0, to: 27, by: 1, shape: [3,3,3])
let b = Matft.arange(start: -27, to: 0, by: 1, shape: [3,3,3])
a[Matft.all, Matft.all, 0] = b[Matft.all, Matft.all, 0]
print(a)
/*
mfarray =
[[[ -27, 1, 2],
[ -24, 4, 5],
[ -21, 7, 8]],
[[ -18, 10, 11],
[ -15, 13, 14],
[ -12, 16, 17]],
[[ -9, 19, 20],
[ -6, 22, 23],
[ -3, 25, 26]]], type=Int, shape=[3, 3, 3]
*/ Here is >>> a = np.arange(27).reshape(3,3,3)
>>> b = np.arange(-27,0).reshape(3,3,3)
>>> a[:,:,0] = b[:,:,0]
>>> a
array([[[-27, 1, 2],
[-24, 4, 5],
[-21, 7, 8]],
[[-18, 10, 11],
[-15, 13, 14],
[-12, 16, 17]],
[[ -9, 19, 20],
[ -6, 22, 23],
[ -3, 25, 26]]]) |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thank you! I think I figured out what my problem was. I changed my project in Xcode from using Matft's version tag |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
When do you think you will provide support to pass
SubscriptOps
in setters? I would like to do something likeloss_matrix[:, :, 0] = f_losses[:, :, 0]
. How much effort will this take? I could do it if it looks like it won't be too much work, however I would have to learn the Accelerate framework.Beta Was this translation helpful? Give feedback.
All reactions