QuantEcon.py
QuantEcon.py copied to clipboard
MAINT: Deprecations and Test Warnings
The following deprecation notices and warnings are issued during test runs that should be fixed. @Smit-create would you be able to look into these?
quantecon/markov/tests/test_core.py::test_raises_non_homogeneous_state_values
/Users/mmcky/work/quantecon/QuantEcon.py/quantecon/markov/core.py:230: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray.
values = np.asarray(values)
quantecon/markov/tests/test_ddp.py::TestFiniteHorizon::test_backward_induction
quantecon/markov/tests/test_ddp.py::test_ddp_beta_1_not_implemented_error
/Users/mmcky/work/quantecon/QuantEcon.py/quantecon/markov/ddp.py:430: UserWarning: infinite horizon solution methods are disabled with beta=1
warnings.warn(msg)
quantecon/tests/test_graph_tools.py::test_raises_non_homogeneous_node_labels
/Users/mmcky/work/quantecon/QuantEcon.py/quantecon/_graph_tools.py:140: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray.
values = np.asarray(values)
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
- The 2nd one is as intended. Maybe define a custom warning rather than the generic
UserWarning? - 1st and 3rd should be addressed.
Thanks, @oyamad @mmcky. I can look into this.
thanks @kp992 and @oyamad