From a26149be4efca334f9fca3e528eb6729d8e174b8 Mon Sep 17 00:00:00 2001 From: Ivan Gotovchits Date: Fri, 26 Jan 2024 16:17:25 +0000 Subject: [PATCH] fixes get_cols to return properly chopped series Now the series length is equal to size not the capacity. Fixes #654 --- src/base/misc/owl_dataframe.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/base/misc/owl_dataframe.ml b/src/base/misc/owl_dataframe.ml index 5710fb91d..908db2385 100644 --- a/src/base/misc/owl_dataframe.ml +++ b/src/base/misc/owl_dataframe.ml @@ -414,7 +414,7 @@ let set_by_name x i name a = set x i j a -let to_cols x = x.data +let to_cols x = Array.init (Array.length x.data) (get_col x) let to_rows x = let stack = Owl_utils.Stack.make () in