Git Product home page Git Product logo

Comments (2)

jxx123 avatar jxx123 commented on July 20, 2024

This might be a dependency issue. Mine is good. I feel there is some updates in pandas causing this issue, but I agree the report function is written in quite a messy way. I will need to install the latest pandas and debug more.

from simglucose.

yihuicai avatar yihuicai commented on July 20, 2024

I also met a similar issue when generating report, seems the numpy calculations returns an object which object is not compatible with DataFrame object in pandas library:

Traceback (most recent call last): File "/home/alan/simglucose/sim_origin.py", line 6, in <module> simulate(start_time=datetime.combine(datetime.now().date(), datetime.min.time()),controller=BBController(),cgm_seed=123412,animate=False,parallel=True) File "/home/alan/simglucose/simglucose/simulation/user_interface.py", line 383, in simulate results, ri_per_hour, zone_stats, figs, axes = report(df, save_path) File "/home/alan/simglucose/simglucose/analysis/report.py", line 251, in report ri_per_hour, ri_mean, fig_ri, ax5 = risk_index_trace(BG, visualize=False) File "/home/alan/simglucose/simglucose/analysis/report.py", line 102, in risk_index_trace fBG_df = pd.concat(fBG, axis=1).transpose() File "/home/alan/.local/lib/python3.10/site-packages/pandas/core/reshape/concat.py", line 372, in concat op = _Concatenator( File "/home/alan/.local/lib/python3.10/site-packages/pandas/core/reshape/concat.py", line 462, in __init__ raise TypeError(msg) TypeError: cannot concatenate object of type '<class 'numpy.float64'>'; only Series and DataFrame objs are valid

My dependencies are:

pandas: 2.0.2
numpy: 1.24.3
Python: 3.10.6

from simglucose.

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.