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

as_buffer() support for Object values. #65

Open
TkTech opened this issue Nov 22, 2020 · 3 comments
Open

as_buffer() support for Object values. #65

TkTech opened this issue Nov 22, 2020 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@TkTech
Copy link
Owner

TkTech commented Nov 22, 2020

We now support as_buffer() #59 which drastically improves performance when loading arrays from JSON into numpy.

We should also support as_buffer() for Objects, which would retrieve the values as an array. This is to support calling it like this:

https://github.com/riddell-stan/pystan-next/blob/1e027a8bded88d51c6b957a841b859938c0ac86d/stan/fit.py#L93

For @riddell-stan's use case, this should use less memory and be roughly 4x faster (since we also void the iterator creation for values())

@TkTech TkTech added the enhancement New feature or request label Nov 22, 2020
@TkTech TkTech added this to the v4.0.0 milestone Nov 22, 2020
@TkTech TkTech self-assigned this Nov 22, 2020
@TkTech
Copy link
Owner Author

TkTech commented Mar 20, 2021

Additionally, we should make sure this works for round-tripping into a Panda's dataframe.

@riddell-stan
Copy link

Fixing this would be wonderful. Glad it's on your radar.

FYI: we renamed the repository. Here's an updated link: https://github.com/stan-dev/pystan/blob/1ffd41a5827c4d54c31205e350f0e698bcb2d87f/stan/fit.py#L93

@TkTech TkTech removed this from the v4.0.0 milestone Sep 4, 2023
@fabiopicchi
Copy link

Do you need help with this one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants