Part of #697.
Where
MultipleSeries.pca(), pyleoclim/core/multipleseries.py (~line 1058-1061):
flag, lengths = self.equal_lengths()
if flag==False:
print('All Time Series should be of same length. Apply common_time() first')
else: # if all series have equal length
...
return res
Problem
This is worse than an inconsistency — it's a correctness bug. When series lengths differ, the function print()s a plain string (not warnings.warn, so it can't be filtered, captured by logging, or suppressed/un-suppressed like every other message in the codebase) and then falls off the end of the function with no return, so the caller silently gets None back. Downstream code (res.screeplot(), res.modeplot(), etc., per the method's own docstring example) then fails with a confusing AttributeError: 'NoneType' object has no attribute ... far from the actual cause.
Proposed fix
Raise a ValueError (or equivalent) naming common_time() as the fix, consistent with the unified policy from #697. This one should probably be fixed regardless of how the broader consistency question is resolved, since silently returning None is a bug on its own.
Part of #697.
Where
MultipleSeries.pca(),pyleoclim/core/multipleseries.py(~line 1058-1061):Problem
This is worse than an inconsistency — it's a correctness bug. When series lengths differ, the function
print()s a plain string (notwarnings.warn, so it can't be filtered, captured by logging, or suppressed/un-suppressed like every other message in the codebase) and then falls off the end of the function with noreturn, so the caller silently getsNoneback. Downstream code (res.screeplot(),res.modeplot(), etc., per the method's own docstring example) then fails with a confusingAttributeError: 'NoneType' object has no attribute ...far from the actual cause.Proposed fix
Raise a
ValueError(or equivalent) namingcommon_time()as the fix, consistent with the unified policy from #697. This one should probably be fixed regardless of how the broader consistency question is resolved, since silently returningNoneis a bug on its own.