File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1327,7 +1327,7 @@ def equals(self, other):
1327
1327
# Unary Methods
1328
1328
1329
1329
def __neg__ (self ):
1330
- values = com . values_from_object ( self )
1330
+ values = self . _values
1331
1331
if is_bool_dtype (values ):
1332
1332
arr = operator .inv (values )
1333
1333
elif (
@@ -1341,7 +1341,7 @@ def __neg__(self):
1341
1341
return self .__array_wrap__ (arr )
1342
1342
1343
1343
def __pos__ (self ):
1344
- values = com . values_from_object ( self )
1344
+ values = self . _values
1345
1345
if is_bool_dtype (values ) or is_period_arraylike (values ):
1346
1346
arr = values
1347
1347
elif (
@@ -1796,7 +1796,7 @@ def empty(self) -> bool_t:
1796
1796
__array_priority__ = 1000
1797
1797
1798
1798
def __array__ (self , dtype = None ) -> np .ndarray :
1799
- return com . values_from_object (self )
1799
+ return np . asarray (self . _values , dtype = dtype )
1800
1800
1801
1801
def __array_wrap__ (self , result , context = None ):
1802
1802
result = lib .item_from_zerodim (result )
@@ -8521,7 +8521,7 @@ def _where(
8521
8521
8522
8522
# try to not change dtype at first (if try_quick)
8523
8523
if try_quick :
8524
- new_other = com . values_from_object (self )
8524
+ new_other = np . asarray (self )
8525
8525
new_other = new_other .copy ()
8526
8526
new_other [icond ] = other
8527
8527
other = new_other
You can’t perform that action at this time.
0 commit comments