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

MAINT: Refine order support #75

Merged
merged 2 commits into from
Jun 25, 2024
Merged

MAINT: Refine order support #75

merged 2 commits into from
Jun 25, 2024

Conversation

mtsokol
Copy link
Collaborator

@mtsokol mtsokol commented Jun 24, 2024

Hi @willow-ahrens @hameerabbasi,

This PR refines order support, by allowing finch.asarray(any_input, format=any_format) regardless of any_input order.

Right now it's accomplished by calling copyto! and then dropfills which I think performs copy twice. Could it be achieved with a one function call? (or performing one copy)

  • copyto! for dense source and sparse (e.g. csr) destination copies all elements including fill values as non-fill ones (therefore it requires dropfills)
  • calling only dropfills! fails for csr format as shown here Copying swizzles Finch.jl#609 (comment)

@mtsokol mtsokol added the enhancement New feature or request label Jun 24, 2024
@mtsokol mtsokol self-assigned this Jun 24, 2024
@mtsokol mtsokol linked an issue Jun 24, 2024 that may be closed by this pull request
src/finch/tensor.py Outdated Show resolved Hide resolved
@mtsokol mtsokol merged commit 25d5de0 into main Jun 25, 2024
5 checks passed
@mtsokol mtsokol deleted the order-update branch June 25, 2024 09:57
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.

asarray should convert format if necessary
2 participants