File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -268,6 +268,9 @@ def fit(
268
268
if len (X .shape ) == 1 :
269
269
X .shape = X .shape + (1 ,)
270
270
assert X .shape [0 ] == Y .shape [0 ], "X and Y must have the same number of items!"
271
+ if len (Y .shape ) > 1 :
272
+ Y = Y .ravel ()
273
+ assert X .shape [0 ] == Y .shape [0 ], "Y cannot have multiple columns!"
271
274
self ._X = X
272
275
self ._Y = Y
273
276
if weight is None :
@@ -624,6 +627,9 @@ def __init__(
624
627
if len (X .shape ) == 1 :
625
628
X .shape = X .shape + (1 ,)
626
629
assert X .shape [0 ] == Y .shape [0 ], "X and Y must have the same number of items"
630
+ if len (Y .shape ) > 1 :
631
+ Y = Y .ravel ()
632
+ assert X .shape [0 ] == Y .shape [0 ], "Y cannot have multiple columns!"
627
633
self ._logit = logit
628
634
self ._normalise = normalise
629
635
self ._X = X
You can’t perform that action at this time.
0 commit comments