Julia Programming Language
Map and slice don't preserve the size of an array
General Usage
broadcast
,
array
,
arrays
Peter_Adelman
April 10, 2021, 4:23pm
2
Try this instead:
mapslices(x -> rand(3,4).*x, rand(1,3,4), dims=[2,3])
2 Likes
show post in topic
Related topics
Topic
Replies
Views
Activity
Making mapslices drop dimensions for scalars results automatially
General Usage
question
,
mapslices
3
792
October 22, 2019
Pipe operator with multiple instances
General Usage
question
1
360
December 9, 2020
Broadcast over a specific dimension of array
General Usage
question
7
4589
April 8, 2021
Weird broadcasting behaviour
General Usage
question
,
broadcasting
1
508
May 19, 2020
Multiply each slice of an array by a different number
General Usage
7
442
December 20, 2019