unexpected mapslice result on 0.5rc3

79 views
Skip to first unread message

Marius Millea

unread,
Sep 14, 2016, 12:15:45 PM9/14/16
to julia-users
Is this the expected behavior? 

julia> mapslices(x->tuple(x), [1 2; 3 4], 1)
1×2 Array{Tuple{Array{Int64,1}},2}:
 ([2,4],)  ([2,4],)

julia> mapslices(x->tuple(x...), [1 2; 3 4], 1)
1×2 Array{Tuple{Int64,Int64},2}:
 (1,3)  (2,4)


The first case certainly came as pretty unexpected to me. Does it have something to do with copies vs views into the array?

Tim Holy

unread,
Sep 15, 2016, 10:55:56 AM9/15/16
to julia...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages