diff options
author | alex <argriffi@ncsu.edu> | 2014-02-24 23:10:32 -0500 |
---|---|---|
committer | alex <argriffi@ncsu.edu> | 2014-02-24 23:10:32 -0500 |
commit | 249c38e7e899803c3697bf81707f4f446a67c60a (patch) | |
tree | 9ea23f3bf1cbd92d0ccbfa1ca0477138739d7771 /numpy/lib/twodim_base.py | |
parent | 9573f78c274933e3fead0ce0e976d015764d585b (diff) | |
download | numpy-249c38e7e899803c3697bf81707f4f446a67c60a.tar.gz |
ENH: tril and triu broadcasting
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 8c99f6804..336f23c64 100644 --- a/numpy/lib/twodim_base.py +++ b/numpy/lib/twodim_base.py @@ -430,7 +430,7 @@ def tril(m, k=0): """ m = asanyarray(m) - out = multiply(tri(m.shape[0], m.shape[1], k=k, dtype=m.dtype), m) + out = multiply(tri(m.shape[-2], m.shape[-1], k=k, dtype=m.dtype), m) return out @@ -457,7 +457,7 @@ def triu(m, k=0): """ m = asanyarray(m) - out = multiply((1 - tri(m.shape[0], m.shape[1], k - 1, dtype=m.dtype)), m) + out = multiply((1 - tri(m.shape[-2], m.shape[-1], k - 1, dtype=m.dtype)), m) return out |