From ffe633bdf4ca09b5ad084998c441dc1d109d2fcc Mon Sep 17 00:00:00 2001 From: Travis Oliphant Date: Tue, 28 Mar 2006 21:31:19 +0000 Subject: .ravel and .reshape always return views and raise ValueError if that is impossible. The functions ravel and reshape return views or copies if the view is not possible. --- numpy/core/arrayprint.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'numpy/core/arrayprint.py') diff --git a/numpy/core/arrayprint.py b/numpy/core/arrayprint.py index a649d0211..fd33a44ac 100644 --- a/numpy/core/arrayprint.py +++ b/numpy/core/arrayprint.py @@ -16,6 +16,7 @@ import sys import numeric as _gen import numerictypes as _nt import umath as _uf +from oldnumeric import ravel _nc = _gen # The following functions are emergency substitutes for numeric functions @@ -138,7 +139,7 @@ def _array2string(a, max_line_width, precision, suppress_small, separator=' ', data = _leading_trailing(a) else: summary_insert = "" - data = a.ravel() + data = ravel(a) try: format_function = a._format -- cgit v1.2.1