-
Notifications
You must be signed in to change notification settings - Fork 43
Open
Description
open Nx
let x = randn float32 [| 3; 2 |]
let y = slice [ L [1; 2; 0]; A ] x
let _ = print x
let _ = print yit appears that fancy slicing does nothing:
Nx Info:
Shape: [3; 2]
Dtype: float32
Strides: [2; 1]
Offset: 0
Size: 6
Data: [[-0.114142, 0.0526384],
[-1.02858, 1.56206],
[-0.293303, -0.572624]]
Nx Info:
Shape: [3; 2]
Dtype: float32
Strides: [2; 1]
Offset: 0
Size: 6
Data: [[-0.114142, 0.0526384],
[-1.02858, 1.56206],
[-0.293303, -0.572624]]
But note that e.g. slice [ L [ 2; 1 ]; A ] x works as expected (extracts the 3rd and 2nd rows of x in this order).
Metadata
Metadata
Assignees
Labels
No labels