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!
1 file
+ 1
1
Compare changes
  • Side-by-side
  • Inline
@@ -220,7 +220,7 @@ class Learner1D(BaseLearner):
real = y is not None
if real:
# either it is a float/int, if not, try casting to a np.array
if type(y) not in [float, int]:
if not isinstance(y, (float, int)):
y = np.asarray(y, dtype='float64')
# Add point to the real data dict
Loading