-
Notifications
You must be signed in to change notification settings - Fork 65
Open
Description
Is it possible to support views into arrays? It seems the api might be too specific.
e.g. a Matrix works as expected:
A = [1 2 3; 4 5 6]
B = [0, 1, 0]
C = [1, 1]
@show ncon([A, B, C], [[2,1], [1], [2]])An equivalent view into a matrix throws a MethodError: no method matching sview error
A = view([1 2 3 1; 4 5 6 1; 7 8 9 1], [1,2], [1,2,3])
B = [0, 1, 0]
C = [1, 1]
@show ncon([A, B, C], [[2,1], [1], [2]])Simply doing collect works as expected.
A = collect(view([1 2 3 1; 4 5 6 1; 7 8 9 1], [1,2], [1,2,3]))
B = [0, 1, 0]
C = [1, 1]
@show ncon([A, B, C], [[2,1], [1], [2]])Thank You
Metadata
Metadata
Assignees
Labels
No labels