Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Linkage matrix 'Z' must contain doubles. #23

Closed
ghost opened this issue Jun 19, 2021 · 2 comments
Closed

TypeError: Linkage matrix 'Z' must contain doubles. #23

ghost opened this issue Jun 19, 2021 · 2 comments

Comments

@ghost
Copy link

ghost commented Jun 19, 2021

Hi, I am trying out HRP Portfolio, and its unclear from the tutorial which part of the data should be data type doubles.

I tried to convert my df before passing into HCPortfolio, but the error still occurs:

df = df.astype(np.double)

port = hc.HCPortfolio(returns=df)
@dcajasn
Copy link
Owner

dcajasn commented Jun 19, 2021

Hi, Riskfolio-Lib only takes a returns dataframe as input, never ask for a double type, try with float. I think that the problem is in your data, maybe some nans or str values that makes that the error ocurrs.

@ghost
Copy link
Author

ghost commented Jul 2, 2021

seems like i am not running into this issue for now, will open again if occurs

@ghost ghost closed this as completed Jul 2, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant