Giter VIP home page Giter VIP logo

Comments (16)

dcajasn avatar dcajasn commented on September 24, 2024

which version of Riskfolio-Lib ?

from riskfolio-lib.

srkim avatar srkim commented on September 24, 2024

I'm using version 4.03.

from riskfolio-lib.

dcajasn avatar dcajasn commented on September 24, 2024

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.

srkim avatar srkim commented on September 24, 2024

odd, tried uninstall and reinstall and still getting the error on import.

import riskfolio.Portfolio as pf

from riskfolio-lib.

dcajasn avatar dcajasn commented on September 24, 2024

No, now is just import riskfolio as rp, import riskfolio.portfolio as pf is from very old versions

from riskfolio-lib.

srkim avatar srkim commented on September 24, 2024

tried import riskfolio as rp and still get the Numpy error.

from riskfolio-lib.

dcajasn avatar dcajasn commented on September 24, 2024

Which is your Python version?

from riskfolio-lib.

srkim avatar srkim commented on September 24, 2024

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.

srkim avatar srkim commented on September 24, 2024

Python version 3.9.6

from riskfolio-lib.

srkim avatar srkim commented on September 24, 2024

on Mac M1 version 13.2.1

from riskfolio-lib.

dcajasn avatar dcajasn commented on September 24, 2024

Are you using anaconda ?

from riskfolio-lib.

srkim avatar srkim commented on September 24, 2024

no, not using anaconda.

from riskfolio-lib.

dcajasn avatar dcajasn commented on September 24, 2024

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.

srkim avatar srkim commented on September 24, 2024

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.

dcajasn avatar dcajasn commented on September 24, 2024

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.

dcajasn avatar dcajasn commented on September 24, 2024

Install new version

from riskfolio-lib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.