Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit d28689a56367168e376f68912943572d14fb042c 1 parent b819f2c
Steven Troxler authored
Showing with 3 additions and 9 deletions.
  1. +0 −6 la/flarry.py
  2. +3 −3 la/tests/flarry_test.py
View
6 la/flarry.py
@@ -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
6 la/tests/flarry_test.py
@@ -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.")
Please sign in to comment.
Something went wrong with that request. Please try again.