diff options
author | Gregory Ditzler <gditzler@Gregorys-MacBook-Pro.local> | 2013-03-26 16:01:53 -0400 |
---|---|---|
committer | Gregory Ditzler <gditzler@Gregorys-MacBook-Pro.local> | 2013-03-26 16:01:53 -0400 |
commit | a2370328a4fe23e8d6a56c4fe281d95c443c1ca4 (patch) | |
tree | 489270d39ec165cb3ba1e8475653b95b1846ed20 | |
parent | 63f3d2b3b45183c7f6039bbc575f1effa55c07de (diff) |
cast ints as floats in import_data.py
-rw-r--r-- | test/import_data.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/import_data.py b/test/import_data.py index 6d4bd9e..158e97d 100644 --- a/test/import_data.py +++ b/test/import_data.py @@ -37,7 +37,7 @@ def uniform_data(n_observations = 1000, n_features = 50, n_relevant = 5): import numpy as np xmax = 10 xmin = 0 - data = np.random.randint(xmax + 1, size = (n_features, n_observations)) + data = 1.0*np.random.randint(xmax + 1, size = (n_features, n_observations)) labels = np.zeros(n_observations) delta = n_relevant * (xmax - xmin) / 2.0 |