daru
daru copied to clipboard
`add_vector` should not require name of named Vector.
EDIT (@v0dro): changing this issue to include only the add_vector part.
Vectors 's @name can be useful.
But daru does not seem to use its features.
For example
df = Daru::DataFrame.new(a: [1,2,3], b: [4,5,6])
v = df.a
df2 = Daru::DataFrame.new(c: [7,8,9], d: [10,11,12])
df2. add_vector "a", v
The vector knows its name, but the add_vector method requires the name of the vector.
(pseudocode)
df1 = DataFrame.new
v = df["some_vector"]
df2 = DataFrame
df2. add v
The expected behaviour should be that add_vector should pick up the name of the vector by itself.
This can be separated into two issues:
DataFramecannot use thenamevalue since it is an internal usage parameter.add_vectorshould have an option for not specifying the name of the vector if it already exists within the Vector.
About 1, it cannot be helped since we use the name internally but add_vector is a legit usecase I will amend your issue accordingly.