@@ -1309,7 +1309,7 @@ def __add__(self, other):
1309
1309
if not isinstance (self .dtype , PeriodDtype ):
1310
1310
raise integer_op_not_supported (self )
1311
1311
obj = cast ("PeriodArray" , self )
1312
- result = obj ._addsub_int_array_or_scalar (other * obj .freq . n , operator .add )
1312
+ result = obj ._addsub_int_array_or_scalar (other * obj .dtype . _n , operator .add )
1313
1313
1314
1314
# array-like others
1315
1315
elif is_timedelta64_dtype (other_dtype ):
@@ -1327,7 +1327,7 @@ def __add__(self, other):
1327
1327
if not isinstance (self .dtype , PeriodDtype ):
1328
1328
raise integer_op_not_supported (self )
1329
1329
obj = cast ("PeriodArray" , self )
1330
- result = obj ._addsub_int_array_or_scalar (other * obj .freq . n , operator .add )
1330
+ result = obj ._addsub_int_array_or_scalar (other * obj .dtype . _n , operator .add )
1331
1331
else :
1332
1332
# Includes Categorical, other ExtensionArrays
1333
1333
# For PeriodDtype, if self is a TimedeltaArray and other is a
@@ -1367,7 +1367,7 @@ def __sub__(self, other):
1367
1367
if not isinstance (self .dtype , PeriodDtype ):
1368
1368
raise integer_op_not_supported (self )
1369
1369
obj = cast ("PeriodArray" , self )
1370
- result = obj ._addsub_int_array_or_scalar (other * obj .freq . n , operator .sub )
1370
+ result = obj ._addsub_int_array_or_scalar (other * obj .dtype . _n , operator .sub )
1371
1371
1372
1372
elif isinstance (other , Period ):
1373
1373
result = self ._sub_periodlike (other )
@@ -1391,7 +1391,7 @@ def __sub__(self, other):
1391
1391
if not isinstance (self .dtype , PeriodDtype ):
1392
1392
raise integer_op_not_supported (self )
1393
1393
obj = cast ("PeriodArray" , self )
1394
- result = obj ._addsub_int_array_or_scalar (other * obj .freq . n , operator .sub )
1394
+ result = obj ._addsub_int_array_or_scalar (other * obj .dtype . _n , operator .sub )
1395
1395
else :
1396
1396
# Includes ExtensionArrays, float_dtype
1397
1397
return NotImplemented
0 commit comments