Comments (16)
which version of Riskfolio-Lib ?
from riskfolio-lib.
I'm using version 4.03.
from riskfolio-lib.
I think you must uninstall and reinstall because I removed np.asscalar from all code when numpy gave the deprecation warning on that function.
from riskfolio-lib.
odd, tried uninstall and reinstall and still getting the error on import.
import riskfolio.Portfolio as pf
from riskfolio-lib.
No, now is just import riskfolio as rp, import riskfolio.portfolio as pf is from very old versions
from riskfolio-lib.
tried import riskfolio as rp and still get the Numpy error.
from riskfolio-lib.
Which is your Python version?
from riskfolio-lib.
I did double check after uninstalling and it gave me a no module not found error. Reinstalled and tried to import with import riskfolio as rp and get the numpy error.
from riskfolio-lib.
Python version 3.9.6
from riskfolio-lib.
on Mac M1 version 13.2.1
from riskfolio-lib.
Are you using anaconda ?
from riskfolio-lib.
no, not using anaconda.
from riskfolio-lib.
Use anaconda, for scientific python use anaconda at least on Mac. I also have a M1 and I don't have problems. But install rosetta and download the normal version of anaconda, not the ARM version.
from riskfolio-lib.
I'll try anaconda on a test machine, but in the interim I thought I'd share the following.
File /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/astropy/units/quantity_helper/function_helpers.py:116, in
108 UNSUPPORTED_FUNCTIONS |= {np.linalg.slogdet}
110 # The following are not just unsupported, but so unlikely to be thought
111 # to be supported that we ignore them in testing. (Kept in a separate
112 # variable so that we can check consistency in the test routine -
113 # test_quantity_non_ufuncs.py)
114 IGNORED_FUNCTIONS = {
115 # Deprecated
--> 116 np.asscalar, np.alen,
117 # I/O - useless for Quantity, since no way to store the unit.
118 np.save, np.savez, np.savetxt, np.savez_compressed,
119 # Polynomials
120 np.poly, np.polyadd, np.polyder, np.polydiv, np.polyfit, np.polyint,
121 np.polymul, np.polysub, np.polyval, np.roots, np.vander}
122 if NUMPY_LT_1_20:
123 # financial
124 IGNORED_FUNCTIONS |= {np.fv, np.ipmt, np.irr, np.mirr, np.nper,
125 np.npv, np.pmt, np.ppmt, np.pv, np.rate}
from riskfolio-lib.
As I told you, if you look on the code, Riskfolio-Lib doesn't use np.asscalar. It's a problem with your Python configuration. If you don't use a scientific Python distribution it's not a Riskfolio-Lib issue.
from riskfolio-lib.
Install new version
from riskfolio-lib.
Related Issues (20)
- Constraints in Riskfolio does not work HOT 1
- Conditional Portfolio Allocation Constraints HOT 1
- Can online portfolio problems be solved? HOT 1
- Tutorial 18-AttributeError: 'NoneType' object has no attribute 'to_numpy'-- pls. look into HOT 4
- Positioning vector here HOT 1
- Examples pages HOT 1
- Report generation failing HOT 1
- create reward class as a namespace to hold different reward functions HOT 2
- support Portfolio optimization with factor model? HOT 1
- Problem while installing HOT 3
- Rewording of sentence in README HOT 1
- Python 3.12 support HOT 1
- Latex error building reports... HOT 1
- Possible conceptual error in implementation on HRP (De Prado) HOT 1
- utils.dwnload returns uses closing prices and should use adjusted closing prices HOT 2
- Riskfolio-lib v. 6.1.1 fails with matplotlib 3.8.0 and 3.9.0 HOT 2
- Problem After Code Update HOT 1
- Question about the two_diff_gap_stat function HOT 2
- How to add custom index to jupyter_report() cumulative returns plot? HOT 2
- 【HCPortfolio.py】Why do np.power in MV, This seems to cause RP anomalies HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from riskfolio-lib.