-
Notifications
You must be signed in to change notification settings - Fork 0
Refactor and revise Python module name #19
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
Conversation
ThreeMonth03
left a comment
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.
These suggestions may make your code clean.
By the way, maybe you should present making issues, pulling requests and cleaning codes.
| void print_dims_vec(const std::vector<int64_t> &dims) { | ||
| std::cout << "["; | ||
| for (size_t i = 0; i < dims.size() - 1; ++i) { | ||
| std::cout << dims[i] << ", "; | ||
| } | ||
| std::cout << dims.back() << "]"; | ||
| std::cout << "["; | ||
| for (size_t i = 0; i < dims.size() - 1; ++i) { | ||
| std::cout << dims[i] << ", "; | ||
| } | ||
| std::cout << dims.back() << "]"; | ||
| } | ||
|
|
||
| std::string dims_vec_to_str(const std::vector<int64_t> &dims) { | ||
| std::string str = "["; | ||
| for (size_t i = 0; i < dims.size() - 1; ++i) { | ||
| str += std::to_string(dims[i]) + ", "; | ||
| } | ||
| str += std::to_string(dims.back()) + "]"; | ||
| std::string str = "["; | ||
| for (size_t i = 0; i < dims.size() - 1; ++i) { | ||
| str += std::to_string(dims[i]) + ", "; | ||
| } | ||
| str += std::to_string(dims.back()) + "]"; |
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.
Consider using ofstream to prevent programming the similar function.
As title