Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

REF remove redundant input checks

  • Loading branch information...
commit 9ac7a8785a1047216240a3b89df86ec64d2afd0f 1 parent c583f88
Steven Troxler authored
Showing with 2 additions and 12 deletions.
  1. +2 −12 la/flarry.py
14 la/flarry.py
View
@@ -1847,12 +1847,7 @@ def lrange(shape=None, label=None, start=0, step=1, dtype=None):
if isinstance(shape, int):
shape = (shape,)
if label is not None:
- if shape is not None:
- _shape = [len(lab) for lab in label]
- if _shape != shape:
- raise ValueError("Shape and label cannot disagree")
- else:
- shape = [len(lab) for lab in label]
+ shape = [len(lab) for lab in label]
else:
if shape is None:
raise ValueError("Either `label` or `shape` must be supplied.")
@@ -1940,12 +1935,7 @@ def empty(shape=None, label=None, dtype=None, order='C'):
if isinstance(shape, int):
shape = (shape,)
if label is not None:
- if shape is not None:
- _shape = [len(lab) for lab in label]
- if _shape != shape:
- raise ValueError("Shape and label cannot disagree")
- else:
- shape = [len(lab) for lab in label]
+ shape = [len(lab) for lab in label]
else:
if shape is None:
raise ValueError("Either `label` or `shape` must be supplied.")
Please sign in to comment.
Something went wrong with that request. Please try again.