diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,9 @@
 # Revision history for dataframe-hasktorch
 
+## 0.1.0.2
+
+* Add unbox constraint to `flattenFeatures`.
+
 ## 0.1.0.1
 
 * Export `toIntTensor` function that converts a dataframe to an Int tensor.
diff --git a/dataframe-hasktorch.cabal b/dataframe-hasktorch.cabal
--- a/dataframe-hasktorch.cabal
+++ b/dataframe-hasktorch.cabal
@@ -1,19 +1,19 @@
 cabal-version:      3.0
 name:               dataframe-hasktorch
-version:            0.1.0.1
+version:            0.1.0.2
 synopsis:           Converts between dataframes and hasktorch tensors
 
 description:        
     This package provides seamless conversion between dataframes and hasktorch tensors,
     bridging the gap between data manipulation and machine learning workflows.
-    .
+
     Key features:
-    .
+
     * Convert dataframes to floating-point or integer tensors for ML training
     * Automatic handling of multi-column and single-column dataframes
     * Smart dimensional handling (1D tensors for single columns, 2D for multiple)
     * Type-safe conversions with comprehensive error handling
-    .
+
     Typical workflow: load and transform data using dataframes, then convert to
     tensors for training neural networks with hasktorch.
 
diff --git a/src/DataFrame/Hasktorch.hs b/src/DataFrame/Hasktorch.hs
--- a/src/DataFrame/Hasktorch.hs
+++ b/src/DataFrame/Hasktorch.hs
@@ -105,7 +105,7 @@
          in
             reshape dims' (asTensor (flattenFeatures m))
 
-flattenFeatures :: V.Vector (VU.Vector a) -> VU.Vector a
+flattenFeatures :: (VU.Unbox a) => V.Vector (VU.Vector a) -> VU.Vector a
 flattenFeatures rows =
     let
         total = V.foldl' (\s v -> s + VU.length v) 0 rows
