Does someone knows why
x = df.select(["A"]).unwrap().to_ndarray::<Float64Type>().unwrap()
is considered as a 2d array while I want it to be 1d array? Is there a function to reshape it to 1d array? Here the shape of y
is (100, 1)
.
The type of x
is a ArrayBase<OwnedRepr<f64>, Dim<[usize; 2]>>
Asked
Active
Viewed 171 times
0
-
Please tell us what `y` is. – Wolfgang Kuehn Feb 12 '23 at 23:34
1 Answers
0
You Select a list of columns, the list having length 1. If the row count is say 100, then your resulting 2D-array has dimension (100, 1).

Wolfgang Kuehn
- 12,206
- 2
- 33
- 46