Skip to content

Commit 5eb97b8

Browse files
authored
Merge pull request #7122 from markotoplak/numpy-dep
Handle a numpy's deprecation
2 parents d46e838 + 6081c9e commit 5eb97b8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Orange/misc/distmatrix.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,10 @@ def __array_finalize__(self, obj):
5151
self.col_items = getattr(obj, 'col_items', None)
5252
self.axis = getattr(obj, 'axis', 1)
5353

54-
def __array_wrap__(self, out_arr, context=None):
54+
def __array_wrap__(self, out_arr, context=None, return_scalar=False):
5555
if out_arr.ndim == 0: # a single scalar
5656
return out_arr[()]
57+
del return_scalar # added support for the argument due to a deprecation warning
5758
return np.ndarray.__array_wrap__(self, out_arr, context)
5859

5960
# __reduce__() and __setstate__() ensure DistMatrix is picklable.

0 commit comments

Comments
 (0)