diff options
Diffstat (limited to 'numpy/lib/twodim_base.py')
-rw-r--r-- | numpy/lib/twodim_base.py | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/numpy/lib/twodim_base.py b/numpy/lib/twodim_base.py index 2b4cbdfbb..099fb2960 100644 --- a/numpy/lib/twodim_base.py +++ b/numpy/lib/twodim_base.py @@ -8,7 +8,9 @@ from numpy.core.numeric import ( asarray, where, int8, int16, int32, int64, empty, promote_types, diagonal, nonzero ) -from numpy.core.overrides import set_array_function_like_doc, set_module +from numpy.core.overrides import ( + array_function_dispatch_like, set_array_function_like_doc, set_module + ) from numpy.core import overrides from numpy.core import iinfo @@ -203,7 +205,15 @@ def eye(N, M=None, k=0, dtype=float, order='C', *, like=None): """ if like is not None: - return _eye_with_like(N, M=M, k=k, dtype=dtype, order=order, like=like) + return array_function_dispatch_like( + _eye_with_like, + N, + M=M, + k=k, + dtype=dtype, + order=order, + like=like + ) if M is None: M = N m = zeros((N, M), dtype=dtype, order=order) @@ -405,7 +415,9 @@ def tri(N, M=None, k=0, dtype=float, *, like=None): """ if like is not None: - return _tri_with_like(N, M=M, k=k, dtype=dtype, like=like) + return array_function_dispatch_like( + _tri_with_like, N, M=M, k=k, dtype=dtype, like=like + ) if M is None: M = N |