Permalink
Browse files

ENH Remove potentially confusing functionality.

You cannot pass any larry creation a label without either a shape or a
keyword.
  • Loading branch information...
1 parent b819f2c commit d28689a56367168e376f68912943572d14fb042c @VSTeam VSTeam committed Feb 7, 2012
Showing with 3 additions and 9 deletions.
  1. +0 −6 la/flarry.py
  2. +3 −3 la/tests/flarry_test.py
View
@@ -1846,9 +1846,6 @@ def lrange(shape=None, label=None, start=0, step=1, dtype=None):
"""
if shape is not None:
- if isinstance(shape, list):
- if isinstance(shape[0], list):
- label = shape
if isinstance(shape, int):
shape = (shape,)
if label is not None:
@@ -1939,9 +1936,6 @@ def empty(shape=None, label=None, dtype=None, order='C'):
"""
if shape is not None:
- if isinstance(shape, list):
- if isinstance(shape[0], list):
- label = shape
if isinstance(shape, int):
shape = (shape,)
if label is not None:
View
@@ -680,7 +680,7 @@ def test_lrange_3(self):
ale(a, d, "lrange failed.")
def test_lrange_4(self):
- a = lrange([['a', 'b'], ['c', 'd']])
+ a = lrange(label=[['a', 'b'], ['c', 'd']])
d = larry([[0, 1], [2, 3]], [['a', 'b'], ['c', 'd']])
ale(a, d, "lrange failed.")
@@ -700,7 +700,7 @@ def test_ones_3(self):
ale(a, d, "ones failed.")
def test_ones_4(self):
- a = ones([['a', 'b'], ['c', 'd']])
+ a = ones(label=[['a', 'b'], ['c', 'd']])
d = larry([[1., 1.], [1., 1.]], [['a', 'b'], ['c', 'd']])
ale(a, d, "ones failed.")
@@ -720,7 +720,7 @@ def test_zeros_3(self):
ale(a, d, "zeros failed.")
def test_zeros_4(self):
- a = zeros([['a', 'b'], ['c', 'd']])
+ a = zeros(label=[['a', 'b'], ['c', 'd']])
d = larry([[0., 0.], [0., 0.]], [['a', 'b'], ['c', 'd']])
ale(a, d, "zeros failed.")

0 comments on commit d28689a

Please sign in to comment.