File tree 1 file changed +0
-11
lines changed
1 file changed +0
-11
lines changed Original file line number Diff line number Diff line change @@ -5341,16 +5341,6 @@ def _maybe_update_attributes(self, attrs):
5341
5341
"""
5342
5342
return attrs
5343
5343
5344
- def _validate_for_numeric_unaryop (self , op , opstr ):
5345
- """
5346
- Validate if we can perform a numeric unary operation.
5347
- """
5348
- if not self ._is_numeric_dtype :
5349
- raise TypeError (
5350
- "cannot evaluate a numeric op "
5351
- "{opstr} for type: {typ}" .format (opstr = opstr , typ = type (self ).__name__ )
5352
- )
5353
-
5354
5344
@classmethod
5355
5345
def _add_numeric_methods_binary (cls ):
5356
5346
"""
@@ -5383,7 +5373,6 @@ def _add_numeric_methods_unary(cls):
5383
5373
def _make_evaluate_unary (op , opstr ):
5384
5374
def _evaluate_numeric_unary (self ):
5385
5375
5386
- self ._validate_for_numeric_unaryop (op , opstr )
5387
5376
attrs = self ._get_attributes_dict ()
5388
5377
attrs = self ._maybe_update_attributes (attrs )
5389
5378
return Index (op (self .values ), ** attrs )
You can’t perform that action at this time.
0 commit comments