diff options
Diffstat (limited to 'numpy/lib/twodim_base.py')
-rw-r--r-- | numpy/lib/twodim_base.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/lib/twodim_base.py b/numpy/lib/twodim_base.py index f26ff0619..7670da1ed 100644 --- a/numpy/lib/twodim_base.py +++ b/numpy/lib/twodim_base.py @@ -453,7 +453,7 @@ def tril(m, k=0): m = asanyarray(m) mask = tri(*m.shape[-2:], k=k, dtype=bool) - return where(mask, m, 0) + return where(mask, m, zeros(1, m.dtype)) def triu(m, k=0): @@ -481,7 +481,7 @@ def triu(m, k=0): m = asanyarray(m) mask = tri(*m.shape[-2:], k=k-1, dtype=bool) - return where(mask, 0, m) + return where(mask, zeros(1, m.dtype), m) # Originally borrowed from John Hunter and matplotlib |