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

copy keyword for asarray, Tensor, and astype #45

Merged
merged 2 commits into from
Jun 6, 2024
Merged

copy keyword for asarray, Tensor, and astype #45

merged 2 commits into from
Jun 6, 2024

Conversation

mtsokol
Copy link
Member

@mtsokol mtsokol commented May 10, 2024

WIP copy keyword for asarray, Tensor, and astype.

Fixes #46

@mtsokol mtsokol added the enhancement New feature or request label May 10, 2024
@mtsokol mtsokol self-assigned this May 10, 2024
@mtsokol mtsokol linked an issue May 10, 2024 that may be closed by this pull request
@mtsokol mtsokol force-pushed the asarray-copy branch 2 times, most recently from 56a2edb to 967020f Compare June 6, 2024 09:48
@mtsokol mtsokol changed the title [WIP] copy keyword for asarray, Tensor, and astype copy keyword for asarray, Tensor, and astype Jun 6, 2024
@mtsokol mtsokol marked this pull request as ready for review June 6, 2024 09:48
Copy link
Collaborator

@hameerabbasi hameerabbasi left a comment

Choose a reason for hiding this comment

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

Does Julia not have a way to do a deep copy?

src/finch/tensor.py Show resolved Hide resolved
@mtsokol
Copy link
Member Author

mtsokol commented Jun 6, 2024

Does Julia not have a way to do a deep copy?

Hmm let's discuss it during Finch meeting. But I would leave copying logic in Python and not rely on Julia copying, considering that we already have no-copy logic for NumPy and SciPy inputs in finch-tensor. Let's not disperse it over Python and Julia side.

@hameerabbasi
Copy link
Collaborator

hameerabbasi commented Jun 6, 2024

Does Julia not have a way to do a deep copy?

Hmm let's discuss it during Finch meeting. But I would leave copying logic in Python and not rely on Julia copying, considering that we already have no-copy logic for NumPy and SciPy inputs in finch-tensor. Let's not disperse it over Python and Julia side.

Would you like to implement it later, or in this PR? If the former, let's raise an issue to keep track.

@mtsokol
Copy link
Member Author

mtsokol commented Jun 6, 2024

Would you like to implement it later, or in this PR? If the former, let's raise an issue to keep track.

Let's implement it in a follow-up PR. You mean to allow copying Julia input, right? Like finch.Tensor(julia_obj, copy=True)

Copy link
Collaborator

@hameerabbasi hameerabbasi left a comment

Choose a reason for hiding this comment

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

I created #66 and #67 for the remaining issues, this looks good to go for me.

@mtsokol mtsokol merged commit e0b37d6 into main Jun 6, 2024
5 checks passed
@mtsokol mtsokol deleted the asarray-copy branch June 6, 2024 11:36
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

Successfully merging this pull request may close these issues.

Add copy: bool | None argument for asarray
2 participants