summaryrefslogtreecommitdiff
path: root/numpy/lib/twodim_base.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/lib/twodim_base.py')
-rw-r--r--numpy/lib/twodim_base.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/numpy/lib/twodim_base.py b/numpy/lib/twodim_base.py
index a53790e41..a067139af 100644
--- a/numpy/lib/twodim_base.py
+++ b/numpy/lib/twodim_base.py
@@ -108,8 +108,7 @@ def tri(N, M=None, k=0, dtype=float):
"""
if M is None: M = N
m = greater_equal(subtract.outer(arange(N), arange(M)),-k)
- if m.dtype != dtype:
- return m.astype(dtype)
+ return m.astype(dtype)
def tril(m, k=0):
""" returns the elements on and below the k-th diagonal of m. k=0 is the