Skip to content
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

MAINT: Updates for scipy changes #620

Merged
merged 2 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ variables:
OMP_NUM_THREADS: 1
VML_NUM_THREADS: 1
OPENBLAS_NUM_THREADS: 1
JUPYTER_PLATFORM_DIRS: 1
PYTHONHASHSEED: 12345678 # Ensure tests are correctly gathered by xdist
TEST_INSTALL: false
MPLBACKEND: agg
Expand Down
2 changes: 1 addition & 1 deletion doc/source/changes/5.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ Version 5.0

* Switched variable ordering by default. Importing ``linearmodels.__future__.ordering``
is a no-op, and has no effect.
* Removed dependence on property-cached in favor of :meth:`functools.cached_property`.
* Removed dependence on property-cached in favor of :class:`functools.cached_property`.
16 changes: 7 additions & 9 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,15 +276,13 @@

# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {
"statsmodels": ("https://www.statsmodels.org/dev/", None),
"matplotlib": ("https://matplotlib.org/stable/", None),
"scipy": ("https://docs.scipy.org/doc/scipy/", None),
"python": ("https://docs.python.org/3/", None),
"numpy": ("https://numpy.org/doc/stable/", None),
"np": ("https://numpy.org/doc/stable/", None),
"pandas": ("https://pandas.pydata.org/pandas-docs/stable/", None),
"pd": ("https://pandas.pydata.org/pandas-docs/stable/", None),
"xarray": ("https://docs.xarray.dev/en/stable/", None),
"statsmodels": ("https://www.statsmodels.org/dev", None),
"matplotlib": ("https://matplotlib.org/stable", None),
"scipy": ("https://docs.scipy.org/doc/scipy", None),
"python": ("https://docs.python.org/3", None),
"numpy": ("https://numpy.org/doc/stable", None),
"pandas": ("https://pandas.pydata.org/pandas-docs/stable", None),
"xarray": ("https://docs.xarray.dev/en/stable", None),
}

extlinks = {"issue": ("https://github.com/bashtage/linearmodels/issues/%s", "GH%s")}
Expand Down
6 changes: 3 additions & 3 deletions linearmodels/asset_pricing/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ def fit(
debiased : bool
Flag indicating whether to debias the covariance estimator using
a degree of freedom adjustment
**cov_config : dict
cov_config : dict
Additional covariance-specific options. See Notes.

Returns
Expand Down Expand Up @@ -611,7 +611,7 @@ def fit(
debiased : bool
Flag indicating whether to debias the covariance estimator using
a degree of freedom adjustment
**cov_config
cov_config
Additional covariance-specific options. See Notes.

Returns
Expand Down Expand Up @@ -942,7 +942,7 @@ def fit(
optimizing the objective function. If not provided, defers to
scipy to choose an appropriate optimizer. All minimize inputs
except ``fun``, ``x0``, and ``args`` can be overridden.
**cov_config
cov_config
Additional covariance-specific options. See Notes.

Returns
Expand Down
4 changes: 2 additions & 2 deletions linearmodels/iv/absorbing.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def lsmr_annihilate(
resid = _VARIABLE_CACHE[regressor_hash][variable_digest]
else:
beta = lsmr(x, _y, **default_opts)[0]
resid = y[:, i : i + 1] - (x.dot(sp.csc_matrix(beta[:, None]))).toarray()
resid = y[:, i : i + 1] - x.dot(sp.csc_matrix(beta[:, None])).toarray()
_VARIABLE_CACHE[regressor_hash][variable_digest] = resid
resids.append(resid)
return column_stack(resids)
Expand Down Expand Up @@ -1025,7 +1025,7 @@ def fit(

Use absorb_options to pass options

**cov_config
cov_config
Additional parameters to pass to covariance estimator. The list
of optional parameters differ according to ``cov_type``. See
the documentation of the alternative covariance estimators for
Expand Down
6 changes: 3 additions & 3 deletions linearmodels/iv/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ def fit(
debiased : bool
Flag indicating whether to debiased the covariance estimator using
a degree of freedom adjustment.
**cov_config
cov_config
Additional parameters to pass to covariance estimator. The list
of optional parameters differ according to ``cov_type``. See
the documentation of the alternative covariance estimators for
Expand Down Expand Up @@ -1250,7 +1250,7 @@ def fit(
debiased : bool
Flag indicating whether to debiased the covariance estimator using
a degree of freedom adjustment.
**cov_config
cov_config
Additional parameters to pass to covariance estimator. Supported
parameters depend on specific covariance structure assumed. See
:class:`linearmodels.iv.gmm.IVGMMCovariance` for details
Expand Down Expand Up @@ -1588,7 +1588,7 @@ def fit(
optimizing the objective function. If not provided, defers to
scipy to choose an appropriate optimizer. All minimize inputs
except ``fun``, ``x0``, and ``args`` can be overridden.
**cov_config
cov_config
Additional parameters to pass to covariance estimator. Supported
parameters depend on specific covariance structure assumed. See
:class:`linearmodels.iv.gmm.IVGMMCovariance` for details
Expand Down
10 changes: 5 additions & 5 deletions linearmodels/panel/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -1000,7 +1000,7 @@ def fit(
debiased : bool
Flag indicating whether to debiased the covariance estimator using
a degree of freedom adjustment.
**cov_config
cov_config
Additional covariance-specific options. See Notes.

Returns
Expand Down Expand Up @@ -1865,7 +1865,7 @@ def fit(
Flag indicating that the covariance estimator should be adjusted
to account for the estimation of effects in the model. Only used
if ``auto_df=False``.
**cov_config
cov_config
Additional covariance-specific options. See Notes.

Returns
Expand Down Expand Up @@ -2225,7 +2225,7 @@ def fit(
debiased : bool
Flag indicating whether to debiased the covariance estimator using
a degree of freedom adjustment.
**cov_config
cov_config
Additional covariance-specific options. See Notes.

Returns
Expand Down Expand Up @@ -2527,7 +2527,7 @@ def fit(
debiased : bool
Flag indicating whether to debiased the covariance estimator using
a degree of freedom adjustment.
**cov_config
cov_config
Additional covariance-specific options. See Notes.

Returns
Expand Down Expand Up @@ -2842,7 +2842,7 @@ def fit(
debiased : bool
Flag indicating whether to debiased the covariance estimator using
a degree of freedom adjustment.
**cov_config
cov_config
Additional covariance-specific options. See Notes.

Returns
Expand Down
4 changes: 2 additions & 2 deletions linearmodels/system/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -1291,7 +1291,7 @@ def fit(
* "clustered" - Allows for 1 and 2-way clustering of errors
(Rogers).

**cov_config
cov_config
Additional parameters to pass to covariance estimator. All
estimators support debiased which employs a small-sample adjustment

Expand Down Expand Up @@ -1955,7 +1955,7 @@ def fit(
* "robust", "heteroskedastic" - Heteroskedasticity robust
covariance estimator

**cov_config
cov_config
Additional parameters to pass to covariance estimator. All
estimators support debiased which employs a small-sample adjustment

Expand Down
2 changes: 2 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ pytest>=7.3.0,<8
isort>=5.12
ipython
matplotlib
ruff
flake8
jupyter
nbconvert
nbformat
Expand Down
Loading