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

add interface to build npy_array_list objects from C #30

Merged
merged 2 commits into from
Sep 20, 2024

Conversation

alcubierre-drive
Copy link
Contributor

No description provided.

@oysteijo
Copy link
Owner

oysteijo commented Sep 20, 2024 via email

Copy link
Owner

@oysteijo oysteijo left a comment

Choose a reason for hiding this comment

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

It looks like npy_array_alloc() take a deep copy of an array. Maybe it is better to name it npy_array_deepcopy() ?

In my work I usually have huge arrays - there should be some check on the on the allocated memory.

@alcubierre-drive
Copy link
Contributor Author

That makes a lot of sense. Changed it :)

@oysteijo
Copy link
Owner

I see nothing wrong! Merging!

@oysteijo oysteijo merged commit 80a0b2c into oysteijo:master Sep 20, 2024
1 check passed
@oysteijo
Copy link
Owner

Thanks a lot Lennart!

I think actually you are touching into the problem in #14. The user can have arrays where they do not "own" the items of the array_list. If you can think of somtheing better/simpler, I would love to hear ideas.

-Øystein

@alcubierre-drive
Copy link
Contributor Author

How about a public and a private data pointer, where the private one is left as NULL in case the array doesn't own the data?

@oysteijo
Copy link
Owner

oysteijo commented Sep 21, 2024 via email

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

Successfully merging this pull request may close these issues.

2 participants