From 9d8e2024ff9014fa2fd9a29812cec615dff6feb9 Mon Sep 17 00:00:00 2001 From: Travis Oliphant Date: Sat, 5 Aug 2006 01:20:56 +0000 Subject: More fixes to backward compatibility --- numpy/oldnumeric/olddefaults.py | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 numpy/oldnumeric/olddefaults.py (limited to 'numpy/oldnumeric/olddefaults.py') diff --git a/numpy/oldnumeric/olddefaults.py b/numpy/oldnumeric/olddefaults.py deleted file mode 100644 index 384261437..000000000 --- a/numpy/oldnumeric/olddefaults.py +++ /dev/null @@ -1,32 +0,0 @@ -__all__ = ['ones', 'empty', 'identity', 'zeros'] - -import numpy.core.multiarray as mu -import numpy.core.numeric as nn -from typeconv import convtypecode - -def ones(shape, typecode='l', savespace=0, dtype=None): - """ones(shape, dtype=int) returns an array of the given - dimensions which is initialized to all ones. - """ - dtype = convtypecode(typecode,dtype) - a = mu.empty(shape, dtype) - a.fill(1) - return a - -def zeros(shape, typecode='l', savespace=0, dtype=None): - """zeros(shape, dtype=int) returns an array of the given - dimensions which is initialized to all zeros - """ - dtype = convtypecode(typecode,dtype) - return mu.zeros(shape, dtype) - -def identity(n,typecode='l', dtype=None): - """identity(n) returns the identity 2-d array of shape n x n. - """ - dtype = convtypecode(typecode, dtype) - return nn.identity(n, dtype) - -def empty(shape, typecode='l', dtype=None): - dtype = convtypecode(typecode, dtype) - return mu.empty(shape, dtype, order) - -- cgit v1.2.1