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

Sparse bigarray support #7224

Closed
vicuna opened this issue Apr 12, 2016 · 1 comment
Closed

Sparse bigarray support #7224

vicuna opened this issue Apr 12, 2016 · 1 comment

Comments

@vicuna
Copy link

vicuna commented Apr 12, 2016

Original bug ID: 7224
Reporter: @db4
Status: acknowledged (set by @damiendoligez on 2017-04-14T14:37:43Z)
Resolution: open
Priority: normal
Severity: feature
Category: otherlibs
Monitored by: @gasche @diml @hcarty

Bug description

I would love to have sparse array support in bigarray library like Python numpy or OpenCV libraries have. It means that in addition to "dim" array in "struct caml_ba_array" you also have "step" array (steps are specified in bytes) so the address of an element with index [i0,i1,...,in] is calculated as

data + step[0]*i0 + step[1]*i1 + ... +step[n]*in

This does not introduce any performance penalty compared to the current implementation, but allows arbitrary slicing without copying underlying data. It would also allow simpler interfacing with different C libraries for numerical calculations, image processing etc.

It does require some modifications to compare, hash, copy etc. primitives, but although they will be more complicated, performance should not suffer.

@github-actions
Copy link

This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc.

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

No branches or pull requests

1 participant