diff --git a/quantecon/_graph_tools.py b/quantecon/_graph_tools.py index 3f4dca799..1f6c05db8 100644 --- a/quantecon/_graph_tools.py +++ b/quantecon/_graph_tools.py @@ -137,7 +137,7 @@ def node_labels(self, values): if values is None: self._node_labels = None else: - values = np.asarray(values) + values = np.asanyarray(values) if (values.ndim < 1) or (values.shape[0] != self.n): raise ValueError( 'node_labels must be an array_like of length n' diff --git a/quantecon/markov/core.py b/quantecon/markov/core.py index 53d10bceb..2eecc55e9 100644 --- a/quantecon/markov/core.py +++ b/quantecon/markov/core.py @@ -227,7 +227,7 @@ def state_values(self, values): if values is None: self._state_values = None else: - values = np.asarray(values) + values = np.asanyarray(values) if (values.ndim < 1) or (values.shape[0] != self.n): raise ValueError( 'state_values must be an array_like of length n'