-
Notifications
You must be signed in to change notification settings - Fork 36
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
DataFrameDimension #807
DataFrameDimension #807
Conversation
LGTM. Got a couple of issues for NIXPy out of this. |
@gicmo Will you have a look at this or should I go ahead and merge? |
686c5a7
to
26bfbdb
Compare
Codecov Report
@@ Coverage Diff @@
## master #807 +/- ##
=========================================
Coverage ? 94.66%
=========================================
Files ? 177
Lines ? 12385
Branches ? 0
=========================================
Hits ? 11724
Misses ? 661
Partials ? 0
Continue to review full report at Codecov.
|
91961bd
to
eaf457e
Compare
backend/hdf5/DimensionHDF5.cpp
Outdated
if (col_index == -1) | ||
return df.name(); |
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 think, if we just move that above column_index = checkColumnIndex(col_index);
we can get rid of the try-catch
block. I am not a huge fan of using exceptions for control flow in C++.
include/nix/DataArray.hpp
Outdated
std::vector<std::string> names = {column_name}; | ||
std::vector<unsigned> indices = frame.colIndex(names); | ||
index = indices[0]; |
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.
There is unsigned colIndex(const std::string &name) const
as a non-vector overload.
apt: | ||
update: true | ||
packages: | ||
- lcov |
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.
That is in theory not needed anymore, right @achilleas-k
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.
Correct. Remove it.
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.
No U!
} | ||
|
||
nix::DataFrame df = dataFrame(); | ||
std::vector<Column> cols = df.columns(); |
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.
Krass oversight in the DataFrame
API that we have to fetch all the column information if all we want is the number. Filed as issue #808
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.
Looks good. Some minor stuff we can fix in post :)
boost::optional<unsigned> column_index = checkColumnIndex(col_index); | ||
|
||
nix::DataFrame df = dataFrame(); | ||
std::vector<Column> all_cols = df.columns(); |
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.
Also lame that we have to fetch all of them if we only want one. Filed as issue #809
No description provided.