New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CLN: Fixes for future SciPY and pandas #6414
Conversation
don't merge this before a review AFAICS, adding My computer is not usable at the moment, so it will take a day until I can look at it. |
@@ -406,15 +406,17 @@ def plot_partregress(endog, exog_i, exog_others, data=None, | |||
# all arrays or pandas-like | |||
|
|||
if RHS_isemtpy: | |||
endog = np.asarray(endog) | |||
exog_i = np.asarray(exog_i) | |||
ax.plot(endog, exog_i, 'o', **kwargs) | |||
fitted_line = OLS(endog, exog_i).fit() | |||
x_axis_endog_name = 'x' if isinstance(exog_i, np.ndarray) else exog_i.name | |||
y_axis_endog_name = 'y' if isinstance(endog, np.ndarray) else endog.design_info.column_names[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with the asarray above we always have np.ndarray and we loose the names
which should be used in the plots.
Why do we need the asarray? What changed in pandas?
ecf5379
to
c0763f6
Compare
Codecov Report
@@ Coverage Diff @@
## master #6414 +/- ##
==========================================
+ Coverage 85.07% 85.08% +0.01%
==========================================
Files 642 642
Lines 103364 103501 +137
Branches 11284 11312 +28
==========================================
+ Hits 87933 88065 +132
Misses 12957 12957
- Partials 2474 2479 +5
Continue to review full report at Codecov.
|
pd.Series([1,2,3])[:,None] will not be allowed in the future. Most of the plotting is probably a MPL issue, so I'll defer these. |
b35b88d
to
4ecea55
Compare
Silence new warnings produced by pandas 1.0+ Ensure starting values respect builds in HoltWinters
4ecea55
to
8fdf47d
Compare
Silence new warnings produced by pandas 1.0+
Ensure starting values respect builds in HoltWinters
NumPy's guide.
Notes:
needed for doc changes.
then show that it is fixed with the new code.
verify you changes are well formatted by running
flake8
is installed. This command is also available on Windowsusing the Windows System for Linux once
flake8
is installed in thelocal Linux environment. While passing this test is not required, it is good practice and it help
improve code quality in
statsmodels
.