azmyrajab / polars_ols

Polars least squares extension - enables fast linear model polar expressions
MIT License
113 stars 10 forks source link

Import error #4

Closed AdrienDart closed 7 months ago

AdrienDart commented 7 months ago

Hi,

While trying to run the import: "Import polars as pl Import polars_ols as pls"

I get a syntax error: " File (...)/site-packages/polars_ols/init.py:5 from polars_ols.least_squares import (

File (...)/site-packages/polars_ols/least_squares.py:108 Match null_policy:

SyntaxError: invalid syntax "

Thanks

azmyrajab commented 7 months ago

Hi @AdrienDart - sorry the match syntax was introduced in python 3.10 (its basically equivalent to if else)

This problem will go away in the next release as the null policy logic was ported to rust. I'll keep you posted when it is ready

AdrienDart commented 7 months ago

Thank you!

azmyrajab commented 7 months ago

HI @AdrienDart, would you mind trying to upgrade to 0.2.6+, and check if that resolves your issue?

I added a test which ensures that tests run on py38, and fixed a few type hinting syntax to be backwards compatible: so hope it should run smoothly for you now

AdrienDart commented 7 months ago

That works!