mirror of
https://github.com/red-data-tools/YouPlot.git
synced 2025-05-05 22:31:11 +08:00
Moved comments to make method chaining work in Ruby 2.6 and below
This commit is contained in:
parent
a4e747969f
commit
8f52955c19
@ -14,11 +14,11 @@ module YouPlot
|
||||
# value_counts Enumerable::Statistics
|
||||
arr.value_counts(dropna: false)
|
||||
end
|
||||
# faster than `.sort_by{|a| a[1]}`, `.sort_by(a:last)`
|
||||
# `.sort{ |a, b| -a[1] <=> -b[1] }
|
||||
.sort { |a, b| a[1] <=> b[1] }
|
||||
.reverse
|
||||
.transpose
|
||||
# faster than `.sort_by{|a| a[1]}`, `.sort_by(a:last)`
|
||||
# `.sort{ |a, b| -a[1] <=> -b[1] }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user