File tree 2 files changed +13
-8
lines changed
2 files changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -717,8 +717,8 @@ def __abs__(self):
717
717
def __array__ (self , dtype = None ):
718
718
return _values_from_object (self )
719
719
720
- def __array_wrap__ (self , result , copy = False ):
721
- d = self ._construct_axes_dict (self ._AXIS_ORDERS , copy = copy )
720
+ def __array_wrap__ (self , result , context = None ):
721
+ d = self ._construct_axes_dict (self ._AXIS_ORDERS , copy = False )
722
722
return self ._constructor (result , ** d ).__finalize__ (self )
723
723
724
724
# ideally we would define this to avoid the getattr checks, but
Original file line number Diff line number Diff line change @@ -366,18 +366,23 @@ def view(self, dtype=None):
366
366
index = self .index ).__finalize__ (self )
367
367
368
368
def __array__ (self , result = None ):
369
- """ the array interface, return my values """
369
+ """
370
+ the array interface, return my values
371
+ """
370
372
return self .values
371
373
372
- def __array_wrap__ (self , result , copy = False ):
374
+ def __array_wrap__ (self , result , context = None ):
373
375
"""
374
- Gets called prior to a ufunc (and after)
376
+ Gets called after a ufunc
375
377
"""
376
378
return self ._constructor (result , index = self .index ,
377
- copy = copy ).__finalize__ (self )
379
+ copy = False ).__finalize__ (self )
378
380
379
- def __contains__ (self , key ):
380
- return key in self .index
381
+ def __array_prepare__ (self , result , context = None ):
382
+ """
383
+ Gets called prior to a ufunc
384
+ """
385
+ return result
381
386
382
387
# complex
383
388
@property
You can’t perform that action at this time.
0 commit comments