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 Initialisation, Base.resize!, Base.append! and concatenation to interface #20

Open
Luapulu opened this issue Oct 25, 2020 · 0 comments

Comments

@Luapulu
Copy link

Luapulu commented Oct 25, 2020

I had some ideas for possible additions:

It might be cool for something like arr = SomeDiskArray{Float64}(file_handle, undef, 100, 10) to be part of the interface. This would make it possible to treat a DiskArray almost exactly like an Array. Functions like map would "just" work. May be even go so far as to allow arr = SomeDiskArray{Float64}(undef, 100, 10) where the file object is automatically created in the current working dir with some temp name.

If a DiskArray implements the resize! method, we can have an automatic append! be defined for any DiskArray.

For concatenation, we can define a cat!(out, A..., dims=dims) function. If out can be resized, it can be any size, if it cannot, the size of out must be the sum of the sizes of all A. May be use a Trait to specify whether or not a DiskArray can be resized. If we have initialisation defined, we can even have cat work like it does for normal arrays. It'll just initialise a new array and write into it.

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

No branches or pull requests

1 participant