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

csp.stats.list_to_numpy should return a 1DArray, not an NDArray #78

Merged
merged 2 commits into from
Feb 14, 2024

Conversation

AdamGlustein
Copy link
Collaborator

The csp.stats function list_to_numpy should return a 1DArray type since it only produces 1-dimensional array outputs. This can lead to downstream issues when users explicitly type their nodes to accept Numpy1DArray time-series inputs.

…ce it only produces 1-dimensional array outputs

Signed-off-by: Adam Glustein <Adam.Glustein@Point72.com>
@AdamGlustein AdamGlustein added type: bug Concrete, reproducible bugs lang: python Issues and PRs related to the Python codebase labels Feb 13, 2024
@ptomecek ptomecek self-assigned this Feb 13, 2024
Copy link
Collaborator

@ptomecek ptomecek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but should we add a test case that shows you can build a graph that passes the result of list_to_numpy into something that expects Numpy1DArray[float]?

…a ts[Numpy1DArray]

Signed-off-by: Adam Glustein <Adam.Glustein@Point72.com>
@AdamGlustein AdamGlustein merged commit 5089a15 into main Feb 14, 2024
13 checks passed
@AdamGlustein AdamGlustein deleted the numpy-conversions-should-return-1darray branch February 14, 2024 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lang: python Issues and PRs related to the Python codebase type: bug Concrete, reproducible bugs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants