Skip to content

Commit

Permalink
DOC: Replace array with ndarray
Browse files Browse the repository at this point in the history
Use correct type since array.py is not used or supported
  • Loading branch information
bashtage committed Jan 21, 2020
1 parent 5f5a05c commit e0a334c
Show file tree
Hide file tree
Showing 68 changed files with 1,117 additions and 1,120 deletions.
4 changes: 2 additions & 2 deletions statsmodels/base/distributed_estimation.py
Original file line number Diff line number Diff line change
Expand Up @@ -644,8 +644,8 @@ class DistributedResults(LikelihoodModelResults):
Class instance for model used for distributed data,
this particular instance uses fake data and is really
only to allow use of methods like predict.
params : array
Parameter estimates from the fit model.
params : ndarray
Parameter estimates from the fit model.
"""

def __init__(self, model, params):
Expand Down
32 changes: 16 additions & 16 deletions statsmodels/base/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -849,13 +849,13 @@ def expandparams(self, params):
Parameters
----------
params : array
reduced parameter array
params : ndarray
reduced parameter array
Returns
-------
paramsfull : array
expanded parameter array where fixed parameters are included
paramsfull : ndarray
expanded parameter array where fixed parameters are included
Notes
-----
Expand Down Expand Up @@ -981,8 +981,8 @@ class Results(object):
----------
model : class instance
the previously specified model instance
params : array
parameter estimates from the fit model
params : ndarray
parameter estimates from the fit model
"""
def __init__(self, model, params, **kwd):
self.__dict__.update(kwd)
Expand Down Expand Up @@ -1151,8 +1151,8 @@ class LikelihoodModelResults(Results):
The parameters estimated for the model.
scale : float
The scaling factor of the model given during instantiation.
tvalues : array
The t-values of the standard errors.
tvalues : ndarray
The t-values of the standard errors.
Notes
Expand Down Expand Up @@ -2366,10 +2366,10 @@ def bootstrap(self, nrep=100, method='nm', disp=0, store=1):
Returns
-------
mean : array
mean of parameter estimates over bootstrap replications
std : array
standard deviation of parameter estimates over bootstrap
mean : ndarray
mean of parameter estimates over bootstrap replications
std : ndarray
standard deviation of parameter estimates over bootstrap
replications
Notes
Expand Down Expand Up @@ -2442,14 +2442,14 @@ class GenericLikelihoodModelResults(LikelihoodModelResults, ResultMixin):
bic : float
Bayesian information criterion. -2*`llf` + ln(`nobs`)*p where p is the
number of regressors including the intercept.
bse : array
The standard errors of the coefficients.
bse : ndarray
The standard errors of the coefficients.
df_resid : float
See model definition.
df_model : float
See model definition.
fitted_values : array
Linear predictor XB.
fitted_values : ndarray
Linear predictor XB.
llf : float
Value of the loglikelihood
llnull : float
Expand Down
4 changes: 2 additions & 2 deletions statsmodels/base/optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ def _fit(self, objective, gradient, start_params, fargs, kwargs,
Returns
-------
xopt : array
The solution to the objective function
xopt : ndarray
The solution to the objective function
retvals : dict, None
If `full_output` is True then this is a dictionary which holds
information returned from the solver used. If it is False, this is
Expand Down
8 changes: 4 additions & 4 deletions statsmodels/discrete/_diagnostics_count.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ def test_chisquare_prob(results, probs, bin_edges=None, method=None):
----------
results : results instance
Instance of a count regression results
probs : array
Array of predicted probabilities with observations
probs : ndarray
Array of predicted probabilities with observations
in rows and event counts in columns
bin_edges : None or array
intervals to combine several counts into cells
Expand Down Expand Up @@ -212,8 +212,8 @@ def test_poisson_zeroinflation(results_poisson, exog_infl=None):
results_poisson: results instance
The test is only valid if the results instance is a Poisson
model.
exog_infl : array
Explanatory variables for the zero inflated or zero modified
exog_infl : ndarray
Explanatory variables for the zero inflated or zero modified
alternative. I exog_infl is None, then the inflation
probability is assumed to be constant.
Expand Down
48 changes: 24 additions & 24 deletions statsmodels/discrete/count_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ class GenericZeroInflated(CountModel):
Attributes
----------
endog : array
A reference to the endogenous response variable
exog : array
A reference to the exogenous design.
exog_infl: array
A reference to the zero-inflated exogenous design.
endog : ndarray
A reference to the endogenous response variable
exog : ndarray
A reference to the exogenous design.
exog_infl: ndarray
A reference to the zero-inflated exogenous design.
""" % {'params' : base._model_params_doc,
'extra_params' : _doc_zi_params + base._missing_param_doc}

Expand Down Expand Up @@ -462,12 +462,12 @@ class ZeroInflatedPoisson(GenericZeroInflated):
Attributes
----------
endog : array
A reference to the endogenous response variable
exog : array
A reference to the exogenous design.
exog_infl: array
A reference to the zero-inflated exogenous design.
endog : ndarray
A reference to the endogenous response variable
exog : ndarray
A reference to the exogenous design.
exog_infl: ndarray
A reference to the zero-inflated exogenous design.
""" % {'params' : base._model_params_doc,
'extra_params' : _doc_zi_params + base._missing_param_doc}

Expand Down Expand Up @@ -550,12 +550,12 @@ class ZeroInflatedGeneralizedPoisson(GenericZeroInflated):
Attributes
----------
endog : array
A reference to the endogenous response variable
exog : array
A reference to the exogenous design.
exog_infl: array
A reference to the zero-inflated exogenous design.
endog : ndarray
A reference to the endogenous response variable
exog : ndarray
A reference to the exogenous design.
exog_infl: ndarray
A reference to the zero-inflated exogenous design.
p: scalar
P denotes parametrizations for ZIGP regression.
""" % {'params' : base._model_params_doc,
Expand Down Expand Up @@ -628,12 +628,12 @@ class ZeroInflatedNegativeBinomialP(GenericZeroInflated):
Attributes
----------
endog : array
A reference to the endogenous response variable
exog : array
A reference to the exogenous design.
exog_infl: array
A reference to the zero-inflated exogenous design.
endog : ndarray
A reference to the endogenous response variable
exog : ndarray
A reference to the exogenous design.
exog_infl: ndarray
A reference to the zero-inflated exogenous design.
p: scalar
P denotes parametrizations for ZINB regression. p=1 for ZINB-1 and
p=2 for ZINB-2. Default is p=2
Expand Down
72 changes: 36 additions & 36 deletions statsmodels/discrete/discrete_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -914,10 +914,10 @@ class Poisson(CountModel):
Attributes
----------
endog : array
A reference to the endogenous response variable
exog : array
A reference to the exogenous design.
endog : ndarray
A reference to the endogenous response variable
exog : ndarray
A reference to the exogenous design.
""" % {'params' : base._model_params_doc,
'extra_params' :
"""offset : array_like
Expand Down Expand Up @@ -1316,10 +1316,10 @@ class GeneralizedPoisson(CountModel):
Attributes
----------
endog : array
A reference to the endogenous response variable
exog : array
A reference to the exogenous design.
endog : ndarray
A reference to the endogenous response variable
exog : ndarray
A reference to the exogenous design.
""" % {'params' : base._model_params_doc,
'extra_params' :
"""
Expand Down Expand Up @@ -1715,10 +1715,10 @@ class Logit(BinaryModel):
Attributes
----------
endog : array
A reference to the endogenous response variable
exog : array
A reference to the exogenous design.
endog : ndarray
A reference to the endogenous response variable
exog : ndarray
A reference to the exogenous design.
""" % {'params' : base._model_params_doc,
'extra_params' : base._missing_param_doc}

Expand Down Expand Up @@ -1925,10 +1925,10 @@ class Probit(BinaryModel):
Attributes
----------
endog : array
A reference to the endogenous response variable
exog : array
A reference to the exogenous design.
endog : ndarray
A reference to the endogenous response variable
exog : ndarray
A reference to the exogenous design.
""" % {'params' : base._model_params_doc,
'extra_params' : base._missing_param_doc}

Expand Down Expand Up @@ -2154,10 +2154,10 @@ class MNLogit(MultinomialModel):
Attributes
----------
endog : array
A reference to the endogenous response variable
exog : array
A reference to the exogenous design.
endog : ndarray
A reference to the endogenous response variable
exog : ndarray
A reference to the exogenous design.
J : float
The number of choices for the endogenous variable. Note that this
is zero-indexed.
Expand All @@ -2167,8 +2167,8 @@ class MNLogit(MultinomialModel):
names : dict
A dictionary mapping the column number in `wendog` to the variables
in `endog`.
wendog : array
An n x j array where j is the number of unique categories in `endog`.
wendog : ndarray
An n x j array where j is the number of unique categories in `endog`.
Each column of j is a dummy variable indicating the category of
each observation. See `names` for a dictionary mapping each column to
its category.
Expand Down Expand Up @@ -2203,8 +2203,8 @@ def cdf(self, X):
Parameters
----------
X : array
The linear predictor of the model XB.
X : ndarray
The linear predictor of the model XB.
Returns
-------
Expand Down Expand Up @@ -2291,8 +2291,8 @@ def score(self, params):
Parameters
----------
params : array
The parameters of the multinomial logit model.
params : ndarray
The parameters of the multinomial logit model.
Returns
-------
Expand Down Expand Up @@ -2336,8 +2336,8 @@ def score_obs(self, params):
Parameters
----------
params : array
The parameters of the multinomial logit model.
params : ndarray
The parameters of the multinomial logit model.
Returns
-------
Expand Down Expand Up @@ -2478,10 +2478,10 @@ class NegativeBinomial(CountModel):
Attributes
----------
endog : array
A reference to the endogenous response variable
exog : array
A reference to the exogenous design.
endog : ndarray
A reference to the endogenous response variable
exog : ndarray
A reference to the exogenous design.
References
----------
Expand Down Expand Up @@ -2941,10 +2941,10 @@ class NegativeBinomialP(CountModel):
Attributes
----------
endog : array
A reference to the endogenous response variable
exog : array
A reference to the exogenous design.
endog : ndarray
A reference to the endogenous response variable
exog : ndarray
A reference to the exogenous design.
p : scalar
P denotes parameterizations for NB-P regression. p=1 for NB-1 and
p=2 for NB-2. Default is p=1.
Expand Down
12 changes: 6 additions & 6 deletions statsmodels/duration/hazard_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -1362,14 +1362,14 @@ class PHRegResults(base.LikelihoodModelResults):
----------
model : class instance
PHreg model instance that called fit.
normalized_cov_params : array
The sampling covariance matrix of the estimates
params : array
The coefficients of the fitted model. Each coefficient is the
normalized_cov_params : ndarray
The sampling covariance matrix of the estimates
params : ndarray
The coefficients of the fitted model. Each coefficient is the
log hazard ratio corresponding to a 1 unit difference in a
single covariate while holding the other covariates fixed.
bse : array
The standard errors of the fitted parameters.
bse : ndarray
The standard errors of the fitted parameters.
See Also
--------
Expand Down

0 comments on commit e0a334c

Please sign in to comment.