Hi Tero,
Would you (or anyone else following this thread) be able to update the
documentation with the information here and submit a pull request? More
information is available here:
https://github.com/JuliaLang/julia/blob/master/CONTRIBUTING.md#improving-documentation
Cheers,
Kevin
On Sat,
Hi
You should update the documentation to be clearer, thus others wouldn't have to
struggle with the same misunderstanding in the future.
I have written a data structure of the sort "GrowableArray" that doubles
its size each time it appends a value beyond its current size. Much faster
allocation-wise but when using it in the real-world not much performance
improvement (perhaps inefficiencies when reading it? -- need to check)...
Just for clarification: 1D arrays (i.e., Vectors) in Julia are already
growable in the same way as your growable arrays--the backing array doubles
in size when it grows beyond its limit. But you cannot do the same thing
for 2D (or greater) arrays.
A couple of ways around the current limitation:
I too am interested in this. It might be worth building a "GrowableArray"
type for d>1. In the meantime, you can check out DataFrames, they do allow
growing. IIRC they are built as a vector of vector, so you should get
similar performance, but the syntax is nice if you have names for your
Kind of all of the above. Mainly for nonparametric machine learning at the
moment.
ATM I maintain X as a matrix of input vectors and F = [f1,...,fn] a matrix
of outputs (i.e. a row vector in most cases, but sometimes a dxN matrix
with d >1). The sample of the function f: x |-> f(x) is
The choice of the most appropriate data structure depends a lot on what you
plan to do with the data. How are you going to use the vectors? Is the
number of vectors fixed or does it grow/shrink often at runtime? Are you
going to do linear-algebra operations on the set of vectors (e.g.