-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds default order for Daru::DataFrame (issue #130) #329
Conversation
Rspec test added, has been written in the older format to main consistency. This will be easier to change while re-writing all tests to modern specifications file-wise. RDoc documentation has also been added.
lib/daru/dataframe.rb
Outdated
@@ -2278,8 +2289,10 @@ def initialize_from_array source, vectors, index, opts | |||
|
|||
case source.first | |||
when Array | |||
vectors = (0..source.size-1).to_a if vectors.nil? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not ||=
?
@zverok @v0dro - After closer inspection of the logs of the last successful build and current failing build of master branch in Travis CI, I observe that We can specify |
Instead of that, we can fix current rubocop version offences on each PR. They are reasonable, and being a small project we can't expect dedicated volunteers to "update rubocop" in separate PR. So whoever met new offences first is that unfortunate person who fixes them :) |
(but you can exclude Rakefile and Gemfile from rubocop-checked files, of course) |
@zverok - Alright, I'm taking one for the team. :) Rubocop offenses are fixed, and build is finally successful. It does feel good to see the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work 👍
# | ||
# # => | ||
# # #<Daru::DataFrame: bat_man (4x2)> | ||
# # 0 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given your example, shouldn't [6,7,8,9]
be the 1st vector?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for pointing this out - fixed! 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't you use actual executed code for the example? Its better if you do that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hadn't used the actual executed code in the initial commit (I had copy-pasted the previous rdoc
example - my bad). I've added the output I get in the irb
console while initializing the DataFrame given in the rdoc
example, in the subsequent commit.
… argument empty Hash. (SciRuby#395)
Rspec test added, has been written in the older format to main consistency. This will be easier to change while re-writing all tests to modern specifications file-wise, rather than modernizing specs for individual functions. RDoc documentation has also been added.
Tackles issue #130