Skip to content

Commit cccea20

Browse files
authored
Fix documentation and update pandas.
2 parents 87e2298 + cc275cf commit cccea20

File tree

16 files changed

+29
-37
lines changed

16 files changed

+29
-37
lines changed

.readthedocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ python:
77
version: 3.7
88

99
conda:
10-
environment: docs/environment.yml
10+
environment: environment.yml
1111

docs/environment.yml

Lines changed: 0 additions & 8 deletions
This file was deleted.

docs/source/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import sys
1414

1515
sys.path.insert(0, os.path.abspath("../.."))
16+
print(sys.path)
1617

1718
# -- Project information -----------------------------------------------------
1819

@@ -50,11 +51,10 @@
5051
"sphinx.ext.mathjax",
5152
"sphinx.ext.todo",
5253
"sphinx.ext.viewcode",
53-
"nbsphinx",
5454
"numpydoc",
5555
]
5656

57-
napoleon_google_docstring = True
57+
5858
napoleon_numpy_docstring = True
5959
# Add any paths that contain templates here, relative to this directory.
6060
templates_path = ["_templates"]

docs/source/estimation.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,5 +311,4 @@ In the promotion folder of the repository are two demonstration jupyter notebook
311311
`replication
312312
<https://github.com/OpenSourceEconomics/ruspy/blob/kantevorich/promotion/replication/replication.ipynb>`_
313313
notebook allows to easily experiment with the estimation methods described here. If you
314-
have have everything setup, then it should be easy to run it. If not, there is soon
315-
coming a mybinder link and you should keep your eyes open!
314+
have have everything setup, then it should be easy to run it.

docs/source/simulation.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,5 +84,4 @@ Demonstration
8484

8585
In the promotion folder of the repository are two demonstration jupyter notebooks. The
8686
`simulation <https://github.com/OpenSourceEconomics/ruspy/blob/kantevorich/promotion/simulation/simulation_convergence.ipynb>`_ notebook allows to easily experiment with the estimation methods described
87-
here. If you have have everything setup, then it should be easy to run it. If not there
88-
is soon coming a mybinder link and you should keep your `eyes open <https://gph.is/2rY1Er1>`_ !
87+
here. If you have have everything setup, then it should be easy to run it.

environment.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@ dependencies:
44
- python
55
- numpy
66
- sphinx
7-
- pandas=0.25.3
7+
- pandas=1.0.0
88
- statsmodels
99
- pytest
1010
- pytest-xdist
1111
- scipy
1212
- matplotlib
1313
- pytest-cov
14+
- numpydoc
1415
- jupyter
1516
- numba
1617
- mpmath

promotion/replication/group_4.pkl

-21.3 KB
Binary file not shown.

ruspy/estimation/estimation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ def estimate(init_dict, df):
4040

4141
transition_results = estimate_transitions(df)
4242

43-
endog = df.loc[(slice(None), slice(1, None)), "decision"].to_numpy()
44-
states = df.loc[(slice(None), slice(1, None)), "state"].to_numpy()
43+
endog = df.loc[(slice(None), slice(1, None)), "decision"].to_numpy(int)
44+
states = df.loc[(slice(None), slice(1, None)), "state"].to_numpy(int)
4545

4646
(
4747
disc_fac,

ruspy/test/estimation_tests/test_cubic_repl.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ def inputs():
4141
out["params_est"] = result_fixp["x"]
4242
out["trans_ll"] = result_trans["fun"]
4343
out["cost_ll"] = result_fixp["fun"]
44-
out["states"] = df.loc[:, "state"].to_numpy()
45-
out["decisions"] = df.loc[:, "decision"].to_numpy()
44+
out["states"] = df.loc[:, "state"].to_numpy(int)
45+
out["decisions"] = df.loc[:, "decision"].to_numpy(int)
4646
out["disc_fac"] = disc_fac
4747
out["num_states"] = num_states
4848
out["scale"] = scale

ruspy/test/estimation_tests/test_hyperbolic_repl.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ def inputs():
4141
out["params_est"] = result_fixp["x"]
4242
out["trans_ll"] = result_trans["fun"]
4343
out["cost_ll"] = result_fixp["fun"]
44-
out["states"] = df.loc[(slice(None), slice(1, None)), "state"].to_numpy()
45-
out["decisions"] = df.loc[(slice(None), slice(1, None)), "decision"].to_numpy()
44+
out["states"] = df.loc[(slice(None), slice(1, None)), "state"].to_numpy(int)
45+
out["decisions"] = df.loc[(slice(None), slice(1, None)), "decision"].to_numpy(int)
4646
out["disc_fac"] = disc_fac
4747
out["num_states"] = num_states
4848
out["scale"] = scale

0 commit comments

Comments
 (0)