Skip to content
Snippets Groups Projects

Resolve "Learner1D fails when function returns a list instead of a numpy.array"

Merged Jorn Hoofwijk requested to merge 96--accept-lists into master
All threads resolved!
@@ -217,7 +217,7 @@ class Learner1D(BaseLearner):
if real:
# either it is a float/int, if not, try casting to a np.array
if not isinstance(y, (float, int)):
y = np.asarray(y, dtype='float64')
y = np.asarray(y, dtype=float)
# Add point to the real data dict
self.data[x] = y
Loading