From 5ab00bc9c8f3c6e4696154da885506a99159acd9 Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Fri, 29 Sep 2006 22:24:12 +0000 Subject: [PATCH] Fix long-standing misnaming of "factory" method as "array" [SVN r35428] --- src/numeric.cpp | 2 +- test/numpy.py | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/numeric.cpp b/src/numeric.cpp index 698604d0..3e64e141 100644 --- a/src/numeric.cpp +++ b/src/numeric.cpp @@ -205,7 +205,7 @@ namespace aux , bool savespace , object typecode) { - return attr("array")(buffer, type, shape, copy, savespace, typecode); + return attr("factory")(buffer, type, shape, copy, savespace, typecode); } object array_base::getflat() const diff --git a/test/numpy.py b/test/numpy.py index e95bac88..6f186c59 100644 --- a/test/numpy.py +++ b/test/numpy.py @@ -87,11 +87,11 @@ def _numarray_tests(): >>> check(y); >>> check(y.type()); - >>> check(y.array((1.2, 3.4))); - >>> check(y.array((1.2, 3.4), "Double")); - >>> check(y.array((1.2, 3.4), "Double", (1,2,1))); - >>> check(y.array((1.2, 3.4), "Double", (2,1,1), false)); - >>> check(y.array((1.2, 3.4), "Double", (2,), true, true)); + >>> check(y.factory((1.2, 3.4))); + >>> check(y.factory((1.2, 3.4), "Double")); + >>> check(y.factory((1.2, 3.4), "Double", (1,2,1))); + >>> check(y.factory((1.2, 3.4), "Double", (2,1,1), false)); + >>> check(y.factory((1.2, 3.4), "Double", (2,), true, true)); >>> p.results []