Git Product home page Git Product logo

Comments (4)

spidy0x0 avatar spidy0x0 commented on August 26, 2024

i hope this helps,similar problem
https://stackoverflow.com/q/54470408/10346275

also,set your date back by 1 year and try again

from kickscore.

lucasmaystre avatar lucasmaystre commented on August 26, 2024

Hi @Biggels , apologies for the delay (and thank you @spidyhackx for helping out.)

Thanks for reporting. I don't have access to a Windows machine, so it is difficult for me to debug this. I'm glad you were able to work around it in the main notebook.

For the plotting: an easy fix would be to call plot_scores with timestamps=False. This function returns fig, ax, so you could always use ax.set_xticklabels() as needed to create a pretty plot.

Would the following change in plot_scores fix things on windows?

ts = [datetime(1970, 1, 1) + t for t in ts]

from kickscore.

Biggels avatar Biggels commented on August 26, 2024

Thanks for the tip on setting ticklabels manually. Seems obvious in hindsight :)

As for your suggested change, I don't believe you can add a float directly to a datetime object. From some testing, it looks like you have to convert the float time in seconds to a timedelta object first. The following snippet, for example, worked for me to convert all the float times in my dictionary of observations to datetime objects:

from datetime import datetime, timedelta
ts = [observation['t'] for observation in observations]
ts = [datetime(1970, 1, 1) + timedelta(seconds=t) for t in ts]

from kickscore.

lucasmaystre avatar lucasmaystre commented on August 26, 2024

Ah, yes, makes sense. OK, I'll change this in the plotting function 👍

from kickscore.

Related Issues (11)

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.