Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Series constructor ignores dtype #186

Closed
richard-vock opened this issue Mar 18, 2024 · 2 comments · Fixed by #187
Closed

Series constructor ignores dtype #186

richard-vock opened this issue Mar 18, 2024 · 2 comments · Fixed by #187
Assignees
Labels
bug Something isn't working

Comments

@richard-vock
Copy link

Have you tried latest version of polars?

yes

What version of polars are you using?

0.9.0

What operating system are you using polars on?

NixOS unstable

What node version are you using?

node 20.11.0

Describe your bug.

 pl.Series("index", [1, 2, 3], pl.Int64)

yields:

 shape: (3,)
 Series: 'index' [f64]
 [
   1.0
   2.0
   3.0
]
@richard-vock richard-vock added the bug Something isn't working label Mar 18, 2024
@Bidek56
Copy link
Collaborator

Bidek56 commented Mar 18, 2024

Hmm, this is an interesting one, b/c it works fine in bun:

shape: (3,)
Series: 'index' [i64]
[
	1
	2
	3
]

But it produces wrong results in node v20.11.1

@universalmind303
Copy link
Collaborator

universalmind303 commented Mar 18, 2024

This definitely appears to be a regression.

const pl = require('nodejs-polars')
const s = pl.Series("index", [1, 2, 3], pl.Int64)
console.log(s)

Series: 'index' [f64]
[
        1.0
        2.0
        3.0
]

The default export seems to be not working as expected.

@richard-vock i'll try to get this resolved before the next release. In the short term, you can update your require statement to
const pl = require('nodejs-polars').pl and it should work as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants