Closed vanitu closed 6 years ago
Issue is that method "access_row_tuples_by_indexs" returns 2 types of values
Example:
df=Daru::DataFrame.new([{a: 1, b: 2},{a:3,b:4}], index: [:test,:test2])
=> #<Daru::DataFrame(2x2)>
a b
test 1 2
test2 3 4
df2.access_row_tuples_by_indexs(:test)
=> [1, 2] #Array of values
df2.access_row_tuples_by_indexs(:test,:test2)
=> [[1, 2], [3, 4]] #Array of arrays
problem is that populate_row_for(positions) for Numeric position is not wrapped in array
def access_row_tuples_by_indexs *indexes
positions = @index.pos(*indexes)
return populate_row_for(positions) if positions.is_a? Numeric
res = []
new_rows = @data.map { |vec| vec[*indexes] }
indexes.each do |index|
tuples = []
new_rows.map { |row| tuples += [row[index]] }
res << tuples
end
res
end
I found that this error was fixed, but Daru gem is not released and still linked to 7month old version. When Daru release planned and what is the flow for that?
I found that this error was fixed, but Daru gem is not released and still linked to 7month old version. When Daru release planned and what is the flow for that?
In a day or two :)
method fails when DataFrame size == 1