Repository navigation
Conversation
On Windows and Apple Silicon np.longdouble is 8 bytes, and its dtype compares equal to float64 although it is a different type. as_float64, to_array_1d and _float64_pandas returned such data unchanged, so numpy.linalg rejected it with "array type float64 is unsupported in linalg" in ADF, ZivotAndrews, engle_granger, phillips_ouliaris, DynamicOLS, FullyModifiedOLS and the exogenous regressors of the ARX models. Compare the type of the dtype with np.float64, and convert long double pandas data through NumPy, since pandas astype treats it as float64 and does not convert it.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #958 +/- ##
=======================================
Coverage 99.00% 99.01%
=======================================
Files 129 129
Lines 28773 28800 +27
Branches 2231 2234 +3
=======================================
+ Hits 28488 28515 +27
Misses 233 233
Partials 52 52
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
# Conflicts: # arch/utility/array.py
Author
|
#957 handled this in the same manner (dtype.char == "d" and re-building pandas data structures which use long double columns). The dtype table in test_validation_dtypes.py for bashtage includes ADF, engle_granger, and ARX x with np.longdouble. Since the changes in this PR are duplicates of what is now in main after the merge, I am closing this PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On Windows and Apple Silicon np.longdouble is 8 bytes, dtype is float64 despite the types not matching. as_float64, to_array_1d, and _float64_pandas left it uncast, and numpy.linalg complained:
This impacts ADF, ZivotAndrews, engle_granger, phillips_ouliaris, DynamicOLS and FullyModifiedOLS (as well as 8.0), and x parameter of ARX classes (since #948).
Dtype checks are now done on dtype.type == np.float64. pandas astype(np.float64) does nothing to 8-byte long double, so it gets casted using NumPy.
Tests with the new check fail on Windows before this commit, but pass afterwards. Since on Linux long double is 16 bytes, these tests always pass there. There are currently 7 failed tests in test_covariance_dtypes.py that are already merged into main (#942 vs #948).