mirror of
https://github.com/red-data-tools/YouPlot.git
synced 2025-05-07 15:41:12 +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
|
# value_counts Enumerable::Statistics
|
||||||
arr.value_counts(dropna: false)
|
arr.value_counts(dropna: false)
|
||||||
end
|
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] }
|
.sort { |a, b| a[1] <=> b[1] }
|
||||||
.reverse
|
.reverse
|
||||||
.transpose
|
.transpose
|
||||||
|
# faster than `.sort_by{|a| a[1]}`, `.sort_by(a:last)`
|
||||||
|
# `.sort{ |a, b| -a[1] <=> -b[1] }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user