You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
should not be an error. (Right now, scalar numerics get converted up to columns via atleast2d_column_default, but scalar categoricals are just an error.)
And also, that last one should perhaps return a 1d ndarray or Series, not a 2d ndarray or DataFrame. (And this also applies when the data passed in is a Series, e.g. a row from a DataFrame.) The motivation is that this would make
Some things that would be nice:
should probably broadcast
x
againsty
-- very nice for prediction! (But if it were{"x": [1], "y": [1, 2, 3]}
then that should be an error.)should not be an error. (Right now, scalar numerics get converted up to columns via
atleast2d_column_default
, but scalar categoricals are just an error.)And also, that last one should perhaps return a 1d ndarray or
Series
, not a 2d ndarray orDataFrame
. (And this also applies when the data passed in is aSeries
, e.g. a row from aDataFrame
.) The motivation is that this would makegive you a scalar when
betas.ndim == 1
or a 1d vector in the multivariate case wherebetas.ndim == 2
. Butwould give you a 1d vector when
betas.ndim == 1
or a 2d vector in the multivariate case.This would definitely simplify patsy's prediction code!
A concern is that just starting to return 1d design "matrices" (or
Series
withreturn_type="dataframe"
, oops) might break existing code.The text was updated successfully, but these errors were encountered: