GithubHelp home page GithubHelp logo

Support NumPy 2.0 about polars HOT 7 OPEN

stinodego avatar stinodego commented on June 26, 2024
Support NumPy 2.0

from polars.

Comments (7)

ritchie46 avatar ritchie46 commented on June 26, 2024 1

Yes, we must pin numpy 1.0 until then.

from polars.

ritchie46 avatar ritchie46 commented on June 26, 2024

If blocked, it isn't p-high at the moment. :D

from polars.

stinodego avatar stinodego commented on June 26, 2024

If blocked, it isn't p-high at the moment. :D

Indeed. We should have something to mark "high importance" though - which this certainly is.

from polars.

braaannigan avatar braaannigan commented on June 26, 2024

I've encountered a seg fault where another library is converting a Polars dataframe to numpy with numpy 2.0.0 and polars 0.20.31.
Downstream issue is here: Nixtla/mlforecast#354

import polars as pl
df = pl.from_repr("""┌───────────┬─────────────────────┬────────────┐
│ unique_id ┆ ds                  ┆ y          │
│ ---       ┆ ---                 ┆ ---        │
│ cat       ┆ datetime[ns]        ┆ f64        │
╞═══════════╪═════════════════════╪════════════╡
│ id_00     ┆ 2000-01-01 00:00:00 ┆ 17.519167  │
│ id_00     ┆ 2000-01-02 00:00:00 ┆ 87.799695  │
│ id_00     ┆ 2000-01-03 00:00:00 ┆ 177.442975 │
│ id_00     ┆ 2000-01-04 00:00:00 ┆ 232.70411  │
│ id_00     ┆ 2000-01-05 00:00:00 ┆ 317.510474 │
│ id_19     ┆ 2000-03-09 00:00:00 ┆ 28.541985  │
│ id_19     ┆ 2000-03-10 00:00:00 ┆ 33.841384  │
│ id_19     ┆ 2000-03-11 00:00:00 ┆ 38.878866  │
│ id_19     ┆ 2000-03-12 00:00:00 ┆ 43.675512  │
│ id_19     ┆ 2000-03-13 00:00:00 ┆ 49.603114  │
└───────────┴─────────────────────┴────────────┘""")
df["ds"].to_numpy()

This gives a seg fault.

from polars.

braaannigan avatar braaannigan commented on June 26, 2024

@ritchie46
In fact this is enough to produce a seg fault:

import datetime

import polars as pl

pl.Series([datetime.datetime.now()]).to_numpy()

from polars.

stinodego avatar stinodego commented on June 26, 2024

Yes, we are familiar. Nothing we can do about it at the moment, see the linked issue.

from polars.

jmoralez avatar jmoralez commented on June 26, 2024

Nothing we can do about it at the moment

You could also pin numpy here

numpy = ["numpy >= 1.16.0"]

in case you're planning a release soon, that'd ensure compatibility when installing polars[numpy]

from polars.

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.